Infrared signals are beams of light that operate at a wavelength that cannot be seen with a naked eye. When you press a button from your remote, the LED on the remote will turnoff and on in an unique pattern sending the signal to the receiver in the TV. The received signals pluses are converted to electrical signals that are further converted into data in the receiver's electronics.
For this, we are only concerned on receiving the signals. For the best results use any Sony remote.
Before moving any further, download and install infrared library. so visithttps://github.com/shirriff/Arduino-IRremote/
Steps on how to install a library can be found here. This project heavily relies on coding.
Now we need to select the HEX codes of the remote to use it to send directions to our robot. Connect the IR receiver to the arduino as shown in the schematics. Then, open the serial monitor and press four remote buttons you wanted to use to control the movements of the robot ( I used the up/down arrows, you could use numbers instead). Jot down the HEX code.
I got the following Hex codes:
Up arrow= 9CB47
Down= 5CB47
Left= 3CB47
Right= DCB47
*Note:- You'r Hex codes might be different, use the library form github and schematic 1 to setup and note codes
In addition to my previous project's schematics, this setup should be accompanied with it.
Unlike previous project, there is a slight change in the pins that are connected to the motor are as follows:
Pin 2 --------------------------------- 7
Pin 3 --------------------------------- 6 (PMW pin)
Pin 4 --------------------------------- 13
Pin 5 --------------------------------- 12
Pin 6----------------------------------- 9 (PMW pin)
If you find the robot tracks are rotating in opposite directions, that is clockwise and anti-clockwise or vice-versa, reverse the pins (4-7 to 7-4) or numbers in the code.
Comments
Please log in or sign up to comment.