We love the idea of being able to control multiple devices from a single universal remote, so we decided to build a remote with out system that does exactly that.
Assemble the Circuit
Start by placing your 4 push buttons on the breadboard and attaching two MM wires to each, as done below.
Now, place your IR LED on the bread board and connect a wire to each of its leads. Be sure to take note of which leg is long and which is short.
Attach the red wires that are connected to your buttons to the positive voltage rail on your breadboard, attach the negative (short) lead from your LED to the GND rail on your breadboard. Next, attach the 3.3V and GND ports on your Builder Base to the positive voltage and GND rails to your breadboard, respectively.
Now we will wire the Buttons and the LED to the Builder Base. Follow the table below. The numbering of the buttons is one through four with the left most button being button number one.
That's it, your circuit is now complete!
Building the Firmware
In this section we will build the firmware used in this project.
Navigate to the Firmware and select “+ Create New”.
You will now be prompted to name your firmware file, we named ours “IR Remote”.
Now, select the "+ Add Hardware" button and an IR Emitter device to your firmware.
Now, repeating the steps above, we will add four button devices to our firmware file.
Now we will select and configure the drivers for each device. Starting with the IR Emitter, Select IR Emitter for the driver and set the Pin to GP0.
Now we will configure the buttons. Starting with button "B1". Select the GPIO driver, set the Pin to GP1, Debounce to Enabled, and mode to Input Pull Down.
Now we will configure button “B2”.
Now we will configure the button “B3”.
Lastly, we will configure button “B4”.
That’s it, save your firmware and upload it to the client that your IR Remote circuit is connected to!