Hello out ther, I have 5 Arduino and like to try to work with IR.
I wish to know how I can send a command over IR to get and led to flash.
I like this to be so simple as possible. And I like to have it work like this.
Arduino board number 1 will in a loop send a command flash led left pin13, on Arduino board number 5
Arduino board number 2 will in a loop send a command flash led left pin12, on Arduino board number 5
Arduino board number 3 will in a loop send a command flash both led left pin13 and pin12, Arduino board number 5
Arduino board number 4 will in a loop send a command to stop flash led, on Arduino board number 5
Arduino borad number 5 will execute the command giving by one of the nother Arduino´s
If there are any outthere that know how to work with simpel IR and woud give me som help I woud be so happy.
For the 4 Arduino´s I found this code here. From http://www.therobotlab.co.uk/tutorials/ but can I use it?
#define Frequency 38000L // This is the frequency (in Hertz) of the LED
#define IRled 11 // This is the pin the LED is connected to
void setup() {
Serial.begin(2400);
TCCR2A = _BV(WGM21) | _BV(COM2A0);
TCCR2B = _BV(CS20);
OCR2A = (F_CPU/(Frequency*2L)-1);
pinMode(IRled, OUTPUT);
}
void loop()
{
//insert any of your own code in here
}