IR TRANSMISSION BETWEEN ARDUINO DUEMILANOVES?

how can we implement IR transmission among these arduino duemilanoves ......what all shud we need to do it......can anybody please help to know abt the library functions that is available to use in the code n also the connections n al.......??

Maybe virtualwire, some IR LEDs and 38kHz IR receivers would do the trick
You don't say how far or how fast.

can anybody please help to know abt the library functions that is available to use in the code n also the connections n al.......??

This is going to be more of a hardware thing to achieve than the software.

Maybe virtualwire, some IR LEDs and 38kHz IR receivers would do the trick

will the virtual wire library generate the required frequency for this? I've never used it. Also what if its going to be a 2 way communication system? wont the reflected signals be read by the receiver at the sending end?

will the virtual wire library generate the required frequency for this

Of course not - that's what the 555 is there for.

All good projects should have at least one 555.

thank you....sir...

actually the duemilanoves are kept very close to each other....we are using 5 deumilanoves.....we are thinking of one way communications....means it shud transmit data only in one direction.......likewise data o/p from the 1st will be the i/p for the 2nd,its o/p will be the i/p for 3rd n so on.....till the 5th duemilanove.........

we have to send numerals as well as operators. like +,-,/,* etc.........so can u please help us to know..
wat all we need to implement it........

i had gone thru an example IR communication

but i dint get any idea.......please to know how we can do it....i need to know both the h/w and coding part...

if they are going to be real close, then you can try directly using an IR LED Pair, connect the transmitter to the TX pin and the Receiver to the RX pin and try a slow speed serial communication. Beware of natural IR triggering your receiver. This is not the ideal way, but will work. I had done something like this for some cheap fiber optic communication setup using fiber optic from a stereo system. The IR transmitter and receiver should be directly pointed at each other. The IR receiver LED has to be reverse biased(important!) and then you can feed in the receiver input as one input into a comparator(lm358) and the other input from a potentiometer and take the comparator output to the RX pin.

Cheers,
Pracas

but i dint get any idea.......please to know how we can do it....i need to know both the h/w and coding part...

If you can't figure out a way to do this given that example, plus what has been given here, plus every other example available on the internet, etc...

You either need to go back to the examples and the playground, plus read up on basic electronics interfacing...

...or pay someone some money to do it. One thing this forum is not for is providing ready-made plug-and-go solutions to any TD&H's problems. If you want that, stick with Lego.

:stuck_out_tongue:

I'm just seeking a help......
now am having a problem that......when i try to send a 1 it is receiving as 103......dnt know where lies the problem....i vll post the code here

//RX

#include <LiquidCrystal.h>

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

int test=0;

void setup()
{
Serial.begin(2400);
lcd.begin(16,2);
delay(500);
}

void loop()
{

// if incoming serial

if (Serial.available())
{
test = Serial.read();
lcd.setCursor(8,1);
lcd.print(test);
Serial.flush();
}
else
{
lcd.setCursor(8,0);
lcd.print(0);
}
}

//TX

//generates 38kHz carrier wave on pin 9 and 10
//sends data via TX every 500ms

void setup()
{
pinMode(9, OUTPUT);
pinMode(10, OUTPUT);

// Clear Timer on Compare Match (CTC) Mode
bitWrite(TCCR1A, WGM10, 0);
bitWrite(TCCR1A, WGM11, 0);
bitWrite(TCCR1B, WGM12, 1);
bitWrite(TCCR1B, WGM13, 0);

// Toggle OC1A and OC1B on Compare Match.
bitWrite(TCCR1A, COM1A0, 1);
bitWrite(TCCR1A, COM1A1, 0);
bitWrite(TCCR1A, COM1B0, 1);
bitWrite(TCCR1A, COM1B1, 0);

// No prescaling
bitWrite(TCCR1B, CS10, 1);
bitWrite(TCCR1B, CS11, 0);
bitWrite(TCCR1B, CS12, 0);

OCR1A = 210;
OCR1B = 210;

Serial.begin(2400);

}

void loop()
{
Serial.print(5);
delay(500);
}

:cry: :cry: :'(....