This week we started working with the Arduino and serial.
Here I have two potentiometers and a push button:
Using one sensor, I uploaded the example code to display the sensor value in different ways:
We learned how to write to three sensors and view the data in the serial monitor:
Next we learned how to use the arduino to send values from an analog sensor via serial to the p5 IDE.
My favorite friend the sliding 10K pot:
The arduino code to write the single sensor value in binary to serial is pretty simple:
Here is the p5 sketch working with it. It is printing the serial value as text:
Next I mapped this data into a graph:
It was really exciting to get the two potentiometers and the push button to talk to p5 at the same time via serial: