Go Down

Topic: Sunday night simple "cryptography" challenge (Read 1 time) previous topic - next topic

Standard Rockets

Quote

#include <EEPROM.h>
void setup() {
  Serial.begin(115200);
// Uno has 1K of prom, the last 6 bytes are the serial number
// The starting address of the serial number is byte 1018 
  int unoSerial[6];
  int i;
  int startAddr=1018;
  for (i = 0; i < 6; i++) {
    unoSerial = EEPROM.read(startAddr + i);
  }
  
  Serial.print("Your Serial Number is:");
  
  for (i = 0; i < 6; i = i + 1) {
    Serial.print(" ");
    Serial.print(unoSerial, HEX);
  }
  Serial.println();
}

void loop() {
}




I'd like people to refrain from responding for 24 hours as I want to give other newbies like myself a chance at cracking the "code."

Standard Rockets

Change the printing of the array to this:

 for (i = 0; i < 3; i = i + 1) {
   Serial.print(" ");
   Serial.print(unoSerial,BYTE);
 }

 for (i = 3; i < 6; i = i + 1) {
   Serial.print(" ");
   Serial.print(unoSerial, HEX);
 }

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy