My final goal is to use my Arduino microcontroller as an "automatic remote". For now I would like to know how to send decoded NEC protocols one after another in a script.
I am using the Nano V 3.0 with a IR led I salvaged from an old remote. I used a VS838 and a 338R IR receiving module to decode the signals, both work 100%
I know how to send one protocol in a loop.
e.g
#include <IRremote.h>
IRsend irsend;
void setup()
{
}
void loop() {
for (int i = 0; i < 2; i++) {
irsend.sendNEC(0x10676897, 32);
delay(40);
}
delay(5000); //5 second delay between each signal burst
}
I also know how to send the same protocol repetitively.
(Although it won't work in the loop I reckon it'll work in the final script)
e.g
#include <IRremote.h>
IRsend irsend;
void setup()
{
}
void loop() {
for (int i = 0; i < 2; i++) {
irsend.sendNEC(0xFFFFFFFF, 32);
delay(40);
}
delay(5000); //5 second delay between each signal burst
}
However, I would like to include 106722DD
, 10676897
,10678877
and send them in one single C++ Script.
I was thinking something like calling each script through a loop might suffice but I have no idea how to do it in C++
Any help will be appreciated.