UNPKG

pxt-common-packages

Version:
26 lines (16 loc) 685 B
# device Serial Number Get the serial number for the @boardname@ ```sig control.deviceSerialNumber() ``` The system software in your board creates a unique number to identify the board. You can use this number in your program if you want to know which board is running your program. ## Returns * a [number](/types/number) that is created to uniquely identify this board. ## Example #example Write the board serial number to the serial port. ```blocks serial.writeValue("serialnumber", control.deviceSerialNumber()); ``` ## See also #seealso [device long serial number](/reference/control/device-long-serial-number), [device dal version](/reference/control/device-dal-version)