Go Down

Topic: Write HEX to EEPROM (Read 834 times) previous topic - next topic

Xreos

Hi
 
Please help I'm trying to save codes including letters like E0E040BF to EEPROM. I couldn't find a way to make this. I have a code reads IR signals coming from receiver.

Code: [Select]
#include <IRremote.h>

int RECV_PIN = 11;

IRrecv irrecv(RECV_PIN);


decode_results results;

void setup()
{
  Serial.begin(9600);
 
  Serial.println("Enabling IRin");
  irrecv.enableIRIn(); // Start the receiver
  Serial.println("Enabled IRin");
}

void loop() {
  if (irrecv.decode(&results)) {
    Serial.println(results.value, HEX);
    irrecv.resume(); // Receive the next value
  }
  delay(100);
}

robtillaart


use EEPROM.update(address, 0xE0); ??

value can be any number that fit in a byte whether you write it in BIN  HEX or DEC format.
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

robtillaart

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Xreos

Thanks for fast reply. It worked.

Go Up