Tools and materials: -Arduino Nano; -Breadboard; -Wire; -Resistor 10 kOhm; -Off button; -Variable resistor; -Potentiometer; -LED strip with 3 LEDs;
-Laser cutter; -Soldering accessories;
Step one: preparation of parts
First you need to prepare the accessories.
The button has three contacts. For this assembly, only two are needed. You need to solder one wire to the N0 pin, and two to the COM pin. One of these wires is soldered through a resistor.
Three wires must be soldered to the slide resistor to different pads.
The circuit uses a non-pixel LED strip. There are three contact pads on the ribbon. You need to solder wires to these pads.
The potentiometer also has three pads, to which wires are soldered.
Step two: schema
Next, you need to install the parts according to the diagram. The master used analog input pin 0 for the potentiometer, analog input pin 1 for the slider, digital pin 9 for the LED strip, and digital pin 8 for the button.
Step three: the case
The wizard used the MakerCase program to design the case. Files for cutting parts can be downloaded below.
Step four: assembly
Next, assembles the case. Partly uses glue, partly masking tape to fix the parts.
Step five: programming
First, you need to upload the code for interaction between components and Arduino. For the LED strip, you also need to install the Adafruit NeoPixel library.
The code can be downloaded below.
Next, you need to download the code for the game. The wizard gives the code, but any user can upload their own code for their game.
The wizard has downloaded the code from here. When this program is run with Arduino, it generates start code to receive serial output from Arduino in p5.js.
The code below defines the game logic and is written in p5.js.
To sketch the p5 code also an additional file called p5.serialport.js is required: