*Arduino Mega 2560
*Resistor (at least 220 ohms)
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Hardware Setup
Connect pin 9 (& yes, by the way, it has to be pin 9 because the library we will be using consist of only two pins that connect to the 2nd internal clock of the Arduino: pins 9 & 10. 10 doesn't work for this experiment, so you'll have to use pin 9) of the Arduino with your resistor (at least 220 ohms) to the Anode of the LED. Connect GND of the Arduino to the GND part of the breadboard. Connect a wire from GND of the breadboard to the Cathode of the LED. Connect GND to one side of the button. Connect a wire from one side of the button to pin 7 of the Arduino. For the receiver mine is wired as followed: pin 2, 5v, & GND.
You will have to change some things from the code from the website: https://dronebotworkshop.com/using-ir-remote-controls-with-arduino/. Change things such as the hex code, the bit size, & the brand you are using for your TV with the LED, he'll explain it in the tutorial. Here's also another great link: https://forum.arduino.cc/index.php?topic=72541.0.