- Node MCU esp8266
- 5x 6mm button switches
- ⅛” plywood sheet 3mm Acrylic plastic sheet
- 11x wires
- Soldering iron + solder
- Laser cutter
- Hot glue
- Wood glue
- Wood drill
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Build the Circuit
To build the circuit, attach the Node MCU to the breadboard. Run five wires from d-ports 1, 2, 3, 5, and 6 and solder each to a button. Also run five wires from the cathode and solder them to the buttons. Run a final wire from the cathode to the GND port on the Node MCU. The final circuit is shown in the image above.
To test the circuit, connect the Node MCU to a computer running Windows. Upload the code attached below and open the Serial Monitor under “tools” and set it to 9600 baud. If the circuit is wired and connected correctly, when you push a button, a string of text should appear in the Serial Monitor.
Step 2: Connect to the Computer
Go to processing.org and download Processing 3 for Windows. Then download the file attached and run it on the computer. Now, when you press buttons on the Node MCU circuit, you should be able to toggle between different screens (using the side button) and select different applications (using the four top buttons) on the computer.
Step 3: Build the Box
First, download the acrylic laser cutting files attached. Using a laser cutter and a 3mm acrylic plastic sheet, create the top of the laptop control box. Next, go to boxdesigner.connectionlab.org and enter the dimensions for the box. Use the laser cutter again to create the sides and bottom of the box from a ⅛” sheet of plywood. Drill a hole in one of the sides of the box large enough for the wire connecting your computer to the Node MCU to fit through. Drill another hole in another side piece for the side toggling button. Using wood glue, attach the sides of the box to the bottom like puzzle pieces.
Now unplug the Node MCU and run the wire through the side hole, connecting the Node MCU inside the box. Surround the breadboard with blocks of Styrofoam so that it does not move when the box is tilted. Hot glue the edges of the side button to the inside of the box so that the head of the button is accessible through the hole you drilled before. Place a Styrofoam block on top of the ones surrounding the Node MCU and secure the top buttons to it. Finally, hot glue the edge of the plastic square with four holes to the perimeter of the box. For help, refer to the pictures above.