WEEK 9
Lab: Two-Way (Duplex) Serial Communication Using An Arduino and the p5.webserial Library
LINK TO P5 SKETCH
This lab was pretty straightforward after the ones we did last week. I set up the circuit and programmed it to read the data separated by commas. The potentiometers worked fine, but I had problems with the button. It wouldn’t register that it was being pushed. After about 15 minutes of trying different buttons, restarting my laptop, and rewriting the code, I realized that the figure was incorrect, and there needed to be a line from the button to power. Once that was in place, it worked great.


I thought the handshake part was pretty cool, and can see why something like this would be helpful. Another part I had problems with was when I uploaded the sketch to p5, one of the potentiometers didn’t control the circle’s position going up and down. The left to right one worked fine. After some debugging, I realized the potentiometer wasn’t firmly stuck in the breadboard : (
The moral of this lab for me was to triple check the breadboard before I start restarting my computer and fixing the code. All of the issues I ran into with this lab were because of the circuit I built.



Controlling the location of the circle with the potentiometers.
Assistive device to raise/lower window blinds: Instead of multiple strings controlling raising & lowering blinds, attach 2 strings, each with a handle on the bottom. When someone holds it, the blinds raise / lower.
For people who always worry if they left the stove on (me): Install a temperature & distance sensor near the stove. If both the stove is on & the distance sensor registers there is a person standing within 3 feet, nothing happens. But, if the stove is on & the person moves farther away than 3 feet, a speaker emits a loud tone.