PrintInfo.ino 409 B

1234567891011121314151617181920212223
  1. #include <TeensyMAC.h>
  2. void setup() {
  3. Serial.begin(9600);
  4. }
  5. void loop() {
  6. delay(500);
  7. Serial.printf("Serial: %u\n", teensySerial());
  8. Serial.printf("MAC: 0x%012llX\n", teensyMAC());
  9. Serial.print("MAC as array: ");
  10. uint8_t mac[6];
  11. teensyMAC(mac);
  12. for (uint8_t i = 0; i < 6; ++i) {
  13. Serial.printf("%02X", mac[i]);
  14. if (i < 5) {
  15. Serial.print(":");
  16. }
  17. }
  18. Serial.println("");
  19. }