hello
I’m trying to create a loop where valieas are read from 3 arrays and from frist array I get a IR code to be sent trough a IR led, second array I get a description of the code sent, and 3rd aray I get a delay unitl next IR send. (then I’ll show this 2 last datas in an LCD)
As I’m a very poor and newbie programmer I try to debug troug serial monitor printing the values my loop gets, but I get an error mesagge when compiling that I dont understand;
exit status 1
‘i’ was not declared in this scope
my code is the following:
// libreira irsend
#include <IRremote.h>
IRsend irsend;
// libreria irsend FIN
// codigo de lcd
#include <LCD5110_Basic.h>
LCD5110 myGLCD(7,6,5,4,3);
extern uint8_t SmallFont;
extern uint8_t MediumNumbers;
extern uint8_t BigNumbers;
//codigo lcd FIN
// arrays de datos
int ircode = {0x20DF10EF, 0x20DF8877, 0x20DFD22D, 0x20DFD22D, 0x20DF6897, 0x20DF40BF, 0x20DF40BF, 0x20DF40BF, 0x20DF40BF, 0x20DF00FF, 0x20DF00FF, 0x20DF00FF, 0x20DFC03F, 0x20DFC03F, 0x20DFC03F, 0x20DFC03F, 0x20DFC03F, 0x20DF956A, 0x20DF956A, 0x20DF8877, 0x20DFD22D, 0x20DF10EF};
String ircodename = {“poweron”, “Channel_1”, “channel_list”, “channel_list”, “Channel_6”, “volume_up”, “volume_up”, “volume_up”, “volume_up”, “program_up”, “program_up”, “program_up”, “volume_down”, “volume_down”, “volume_down”, “volume_down”, “volume_down”, “guide”, “guide”, “Channel_1”, “channel_list”, “power”};
int ircodedelayseconds = {60, 5, 10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 10, 30, 15};
void setup() {
Serial.begin(9600); //solo para verificar que se esta enviando la señal
myGLCD.InitLCD(); // se inicializa el LCD
myGLCD.setContrast(70); // se pone el contraste a 70
}
void loop() {
for (int i=0; i<=20; i++)
Serial.println(i);
irsend.sendNEC(ircode*,32); //envia señar infrarroja de la poscion i del array*
- Serial.println(“Enviado señal del array”); // imprime por serial que fue enviado*
_ Serial.println(ircode*); // imprime el valor enviado*_
_ Serial.println(ircodename*; // imprime el nombre del valor enviado*_
* for (int ircodedelayseconds[]=0; i<=60; i++)*
* {*
* myGLCD.setFont(SmallFont);*
* myGLCD.print(“POWER”,CENTER,0);*
* myGLCD.print(“Time (s) to”, CENTER,10);*
* myGLCD.print(“next command”,CENTER,20);*
* myGLCD.setFont(BigNumbers);*
* myGLCD.printNumI(i,CENTER,30);*
* delay(1000);*
* }*
}
anyone can give me a hint? thanks!