Let's Make Robots!

arduino infrared help

Anyone out there successfully used the IR libraries with arduino? Calculon is trying to use it with some bots, but not in the way the libraries are written. Calculon is trying to get one duino to talk to another using a byte, the way that a Picaxe can.

All the code and tutorials he has googled seem to be for emulating or talking to a remote control and figuring out the protocol of that remote.

But Calculon doesn't have any remote controls, he just has two lonely arduinos looking to make a connection. Arduino 1 needs to say "A" and arduino 2 needs to hear "A". He doesn't care what protocol it is, he just wants to make a vocabulary of 6 or 8 "byte words".

Anyone know how to do this? 

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

muchas gracias amigo

Ken Shirriff's IR library can let you send and receive using two Arduinos. Just check his example codes.

I have updated his library to work with the newer versions of Arduino as well as the older versions.Thanks to RobotFreak I also have a modified version for Arduino Mega boards that uses timer 5 instead of timer 2. This eliminates the conflict you have when more than one library / command want's to use timer 2.

You can download it from my product support site here: https://sites.google.com/site/daguproducts/home/arduino-libraries

Serial via IR (or something to that effect) is your search term.

Basically, you are going to send data at 38khz (just like a normal remote) but you are going to "mix in" your data. You will have your IR led with one leg going to a PWM output spitting-out a 38khz signal. The other leg of your LED goes to your serial-out pin. 

I am way-over-simplifying this, but a quick google will fill  in the gaps.