Pages: [1]   Go Down
Author Topic: Sunday night simple "cryptography" challenge  (Read 1096 times)
0 Members and 1 Guest are viewing this topic.
On the launch pad
Offline Offline
Newbie
*
Karma: 0
Posts: 11
bzzzzzap
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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."
Logged

On the launch pad
Offline Offline
Newbie
*
Karma: 0
Posts: 11
bzzzzzap
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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);
  }
Logged

Pages: [1]   Go Up
Jump to: