Learning in the MakerSpace: Arduino, Day 2 (AM)

Project 5: Mood Cue

I am now getting extremely frustrated with the poor quality of this kit. This project involves attaching a potentiometer (knob) and a servo motor. The potentiometer doesn’t fit on the breadboard as illustrated in the instructions. After searching through many forums, I found a solution that involved turning the potentiometer sideways and bending out one of the pins. This allowed it to fit and work as intended.

The code for this project was fairly easy to follow. The trick to this code was the map() function which scaled down the potentiometer values to angles between 0 and 179 degrees, which is the limit of the servo motor.


Project 6: Light Theremin

Finally we get to some music! And thankfully, this project worked the first time through! This was a much simpler project to wire than the previous ones. The only components were a piezo and a phototransistor. After uploading the code, the piezo makes sound based on the amount of light that the phototransistor detects.

The first part of the code tells the Arduino to calibrate. It establishes maximum and minimum light levels and creates a 5 second window for the user to move his or her hand over the phototransistor to set the actual limits of light. After that calibration phase, the Arduino maps the light levels to frequency.


Project 7: Keyboard Instrument

Again, the music project works out pretty well. This project used four buttons along with the piezo. Each button outputs a voltage that the code maps to an array of pitches. I had to go into the code and make an adjustment to the first button (mapped to middle C) because it was giving a different reading than what the book listed. I was able to use the Serial Monitor to see the value provided by the button and changed the code to accept a range instead of a specific value.


Learning in the MakerSpace: Arduino, Day 1

I ordered the Arduino starter kit and have been working through the accompanying book of projects. The kit (available at https://store.arduino.cc/usa/arduino-starter-kit) includes an Arduino uno, 15 projects, and the materials to complete those projects. Today, I completed projects 1, 2, 3, and 4.

Project 1: Get to Know Your Tools

This project was about setting up the Arduino and creating simple circuits with an LED, a resistor, and switches. You begin by creating a circuit that powers an LED using the Arduino as a power source. Following the directions in the book, this was very straightforward. From there, you introduce a switch into the circuit. When the switch is pressed, the LED turns on. Next, an additional switch is introduced to the circuit to create a series circuit. Both switches need to be pressed to illuminate the LED. Finally, jumper wires are used to transform the series circuit into a parallel circuit, so that either switch can be pressed individually to activate the LED.

The simplicity of this project to start was motivating. Having creating my first circuit was exciting. The hardest part of this project was finding the right resistor, as my kit included 5-band 220-ohm resistors instead of the 4-band resistors illustrated in the book.

Project 2: Spaceship Interface

This project introduced writing code for the Arduino in addition to creating a circuit. This circuit involved two red and one green LED along with a switch. The final idea was for the green LED to be illuminated until the switch is pressed, causing the two red LEDs to each flash before returning to the original state. Wiring the circuit was fairly straightforward. Sometimes the jumper wires were uncooperative and the breadboard is small, but it worked out.

To write the code, I copied the programming from out of the book. The code is much more complicated than I anticipated, having to create variables right from the start. While it is possible to proceed by just copying what is in the book, it is difficult to learn what exactly is happening. The text begins to fall short here. The instructions move quickly and do not clearly explain what each command is doing. Thankfully, the small amount of programming background I have came in handy and allowed me to follow what was happening. The final result can be seen in the following video.


Project 3: Love-O-Meter

This project involved using a temperature sensor to illuminate LEDs. There are 3 LEDs that are intended to illuminate as the temperature increases. The biggest challenge in this project was finding the temperature sensor. It looks a lot like the transistors that are also included in the kit. The only way I was able to definitively identify it was to see the letters “TMP” printed on the tiny component. I’m beginning to feel like I need a magnifying glass to continue working with this kit.

Again, wiring the circuit was straightforward. The code was even more complex for this project. As with the previous project, I copied the code as it was printed in the text. I had to make a small adjustment for the initial temperature based on the temperature readings I received from the sensor. The idea was for another LED to illuminate every 2 degrees Celsius above the baseline temperature. The temperature changed very slowly when I put my hand on the sensor, and even more slowly when I took my hand away to let the temperature drop. You can see the result of this project in the following video.


Project 4: Color Mixing Lamp

This project really illuminated the shortcomings of this kit. The goal of this project is to have a tri-color LED change color depending on how much red, green, and blue light is detected by phototransistors. The trouble started when I had to set up the colored gels over the phototransistors. The pieces in the kit did not match the illustrations in the book, which led me on a search through the Arduino online forums for help. I eventually figured out how the pieces were supposed to work, but the design was difficult to work with. The gels fell out of position regularly and the breadboard was again too small to easily maneuver the components.

The code for this project was more complex than the previous projects, as to be expected. Variables referenced other variables based on the inputs of the phototransistors. Once I copied the code from the book and loaded it to the Arduino, nothing happened. Again, I went to the online forums and found a lot of other users with issues on this project. I found that by removing the resistors I placed on the breadboard, as per the instructions, the tri-color LED would light up. However, I did not see any change based on the lighting on each phototransistor. I did not see any mistakes in the code nor the setup based on the instructions. It is possible that the instructions or components were wrong.


Podcast Interview with Katie Wardrobe

Last month, I spoke with Australian music educator and music technology consultant Katie Wardrobe for her “Music Tech Teacher” podcast. We spoke for about 45 minutes about the value of learning to code in a music class and how to use Scratch and Makey Makeys in the classroom. We shared some different project ideas as well as some of the challenges that arise when using these tools. Check out the podcast and my slides on Scratch and Makey Makeys as well.

Music Education