serial communication is the process of sending data one bit at a time, sequentially, over a communication channel or computer bus. This is in contrast to parallel communication, where several bits are sent as a whole, on a link with several parallel channels.
smoothing: averages analog input to a smooth curve
asynchronous serial basics: for all serial connections, you need 1) physical connection, 2) logic level, 3) transmission rate, 4) interpretation
each device has its own “clock” (baud rate)
baud rate (transmit/receive rate): speed of bit transmission
*consistently 1023 reading = short circuit; erratic/inconsistent readings means bad connection to ground
So my theremin from Friday basically ended up a keyboard, so I figured I might as well complete the thought. All I needed to do was remove the photoresistor and add a few more buttons, right? Here’s what I started with:
It worked! Kind of. So I attempted to create a full keyboard, but the eighth key didn’t fit in my breadboard…
Despite lining up the resistors in increasing order, the readings seemed to be all over the place (~970, ~8, ~510, ~698, ~930, ~970, ~1023)—hence the notes coming in at random when the keys are played in order. Hopefully it’s only a matter of replacing a few faulty resistors…
Here’s the code:
Okay not really, as the speaker makes it completely impossible to actually play the keys. But that’s nothing a trip to Tinkersphere can’t fix.
For this week’s homework, I thought it would be cool to make a theremin. Since the only appropriate sensor I had for this endeavor was a photoresistor, it would have to be a light theremin. Here was the game plan:
Readings from the photoresistor would feed into the Arduino as an analog input, which would then map to digital output via PWM, causing the piezo to emit varying tones.
Well, it worked, but the theremin sounded god-awful and insufferably loud to boot, so I decided to add a potentiometer next to the piezo in order to adjust the voltage (ie, the volume).
Somewhat better, but the sound was still so grating that I also wanted to be able to turn it off. Lacking a slide switch, I added a button, which obviously is not the same thing.
Not a great solution, and I’m quickly growing tired of this theremin. I like the button though, so I’ll probably try to make some sort of keyboard instead.