Hello,
I am trying to fetch the IR remote code stored at EEPROM, then send this remote code using IRRemote library.
Below is my code.
#include<IRremote.h>
#include<EEPROM.h>
IRsend irsend;
int e;
//int f = 0;
int var, counter = 0;
int data;
unsigned int ep_data_get[1024];
void setup()
{
Serial.begin(9600);
Serial.println("Inside Setup");
loop_t();
}
void Send_EEPROM_Remote_Code(unsigned int ep_data_get[],unsigned int code_len)
{
irsend.sendRaw(ep_data_get,code_len,38); //here 38 es eR segnal careeer frequency.
Serial.println("EEPROM Memory data is sent");
}
void loop_t()
{
Serial.println("loop_t");
for(e = 0,data = 0; e < (200); e++,data++)
{
var = e;
ep_data_get[data] = EEPROM.read(e);
delay(25);
while(EEPROM.read(var) == 0)
{
counter++;
var++;
if(counter == 5) // checkeng next 4 memory location. if they are 0 then i assumed that code is finished so break it.
break;
}
if(counter == 5)
break;
}
Serial.println("loop_t");
Send_EEPROM_Remote_Code(ep_data_get,var - 4);
if(e >= 1023)
e = 0;
Serial.println("EEPROM raw code sent");
delay(500);
}
void loop()
{
// nothing.
}
I uploaded the code to my arduino uno successfully.
But, when i open serial monitor, it does not show any thing. Even it does not print Inside setup
I tried to debug it, but not able to resolve it.
Kindly suggest how i fix this problem ?
Thank You.