by i-Bot » Thu Jul 24, 2008 11:40 am
by i-Bot
Thu Jul 24, 2008 11:40 am
I put the IR code I worked on here:
http://robosavvy.com/Builders/i-Bot/RobobuilderIR.zip
The example only checks the IR for a character and sends the character to the CPU serial port in the example. To make the IR change the moves, it just needs a to change the pointers at the bottom of the comm.c file based on the received code. I will do this, but am rather busy on the PS2 controller and hip rotation.
The IR receive is done mainly in the interrupt routine for the external interrupt 6, though it also uses timer 2 for timing the receiver and for a timeout interrupt.
My IR controller has the address
#define IR_ADDRESS 0x2B // Address code from IR
I don't know if they vary, so please try it and let me know. I do check the address, though this could be disabled.
gIRReady is TRUE when a code is received and gIRData contains the code. The code is according to the pdf file and ranges from 0x01 to 0x3f.
I am using the AVRlib from Pascal Stang, which contains lots of other useful bits of code.
I put the IR code I worked on here:
http://robosavvy.com/Builders/i-Bot/RobobuilderIR.zip
The example only checks the IR for a character and sends the character to the CPU serial port in the example. To make the IR change the moves, it just needs a to change the pointers at the bottom of the comm.c file based on the received code. I will do this, but am rather busy on the PS2 controller and hip rotation.
The IR receive is done mainly in the interrupt routine for the external interrupt 6, though it also uses timer 2 for timing the receiver and for a timeout interrupt.
My IR controller has the address
#define IR_ADDRESS 0x2B // Address code from IR
I don't know if they vary, so please try it and let me know. I do check the address, though this could be disabled.
gIRReady is TRUE when a code is received and gIRData contains the code. The code is according to the pdf file and ranges from 0x01 to 0x3f.
I am using the AVRlib from Pascal Stang, which contains lots of other useful bits of code.