Skip to content

Instantly share code, notes, and snippets.

@eggfly
Forked from ksasao/read_guid.ino
Created September 28, 2021 03:49
Show Gist options
  • Save eggfly/4b08dbe239e71fabae1ed23f8398b10d to your computer and use it in GitHub Desktop.
Save eggfly/4b08dbe239e71fabae1ed23f8398b10d to your computer and use it in GitHub Desktop.
Read GUID of LGT8F328P
void setup() {
Serial.begin(9600);
delay(1000);
// read GUID of LGT8F328P
// https://www.avrfreaks.net/sites/default/files/forum_attachments/LGT8F88P%20LGT8F168P%20LGT8F328P%20translated.pdf
// if you want to read other device's unique id, use ArduinoUniqueID
// https://www.arduinolibraries.info/libraries/arduino-unique-id
#ifdef _LGT8F328P_SPEC_H_
char buf[10];
sprintf(buf,"%02X%02X%02X%02X",GUID3,GUID2,GUID1,GUID0);
Serial.print("device_id ");
Serial.print(buf);
Serial.print("\n");
#endif
Serial.println("initialized.");
}
void loop() {
delay(1000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment