Let's Make Robots!

IR with Picaxe

Hey guys,

For a while now I have been really interested in getting started with IR communication with the picaxe.  The past few nights I have been doing a lot of research on where I should get started. My long term goal would be to create an IR Remote control to control a small robot with basic commands similar to what I have seen in a post from Oddbot. For now I would obviously like to start simple and work my way up from there. I have found a few different kits available on ebay such as this. Just curious if this is a good way to start out or if i should buy a bunch of IR leds and Infrared Receivers and go from there. Im just finding it hard to find any starter tutorials on this subject.

Hope you guys could point me in the right direction!



Comment viewing options

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

First off, IR is just something Picaxe does --built in. There are commands to send and recieve IR "commands" and if you are using the 28x board, there is even a place on the board to solder the receiver and related parts. If you are not using the 28x board, putting together the IR circuit is not hard --and it is in the manual.

From there, you can use any remote control you want as long as it will work with a Sony TV. Any universal remote will work. Almost any sony remote will work. You set up your reciever, set the picaxe to receive the signal and put the data into a variable, done. When you hit a button on the remote, you get a corresponding number in a variable. You can do anything you want with that variable.


Chris, I made an IR receiver program with the BS2 but you have wait for the start bit, then capture each bit after that and based on length of time the IR flashes, such as 600ms or 1300ms, you assign a 0 or 1, then you assemble the bits to make a byte, then you know what button was pressed on the IR remote.   

its easy now that I figured it out.

are you saying the picaxe is easier or about the same?

The picaxe does all the work for you and all that work is being hidden by just one command.

IRIN [timeout, address], pin, variable

 It will wait as for as much or as little as you want for something to come in, when it does, it puts the number in a variable for you. That's it.


Thanks for the help chris, Made things a lot easier to understand! :)