Object: Entry 3

Analog I/O

Part 1

The first part of this lab was to create a simple analog input with varying output. For mine, I used a pressure sensor, a potentiometer, and NeoPixels to create a rudimentary strong man device. The number of lights corresponded to the pressure and the color was changed by rotating the potentiometer.

Schematics of part 1

I adopted the WheelPosition function from the AdaFruit strandtest.ino in order to convert the scalar potentiometer readings to cyclic color values. The one issue with this code is that as it updates every half second some pixels were given colors and then not reassigned to blank after the pressure was removed causing the colors to appear off at times.

Part 1 finished
Potentiometer readings in serial monitor
Video demonstration

Part 2

In the second part, we used an analog input to control the tone of a speaker. I found the random buzzing that was created to be annoying so I changed it to notes.

Schematics for part 2

The note values were taken from Wikipedia.

Part 2 testing

For this project, I made a box from plywood. Unfortunately, I was unable to locate my jigsaw and had to use a circular saw (which was too large for such a small project) and a dremel (which was too small). I made most of the pieces larger than needed and then sanded down to size.

Finished box
Video Demonstration