This modification gives the user the ability to access the unique serial-number built into Feather M0s for whatever purpose they need (see: discussion).
Overview of changes:
Added new #define for serial no. length at top of Module.h
Added new protected character array to store serial no.
Wrote private read_serial_no method that actually reads serial number in from registers and stores it in the array
Added a call to read_serial_no in Module init
Wrote a public get_serial_no method which simply returns the serial no. in the character array
Example use:
LPrintln(Feather.get_serial_no()); // Prints the serial number
Testing:
This was tested on a Feather M0 proto basic and Feather M0 WiFi but all Feather variants use the SAMD21 chip so this should work on all Feather variants.
This modification gives the user the ability to access the unique serial-number built into Feather M0s for whatever purpose they need (see: discussion).
Overview of changes:
Example use:
LPrintln(Feather.get_serial_no()); // Prints the serial number
Testing: This was tested on a Feather M0 proto basic and Feather M0 WiFi but all Feather variants use the SAMD21 chip so this should work on all Feather variants.