This week’s blog was a refresher on Serial communications, a topic I had to get quite comfortable with during my Midterm project. During my midterm, I had to implement handshake protocols to pass data back and forth to the microcontroller driving my installation (an Adafruit Feather M0), and handle the host-side of things in Python as opposed to P5 or Processing.

Probably the most interesting thing I read about here had to do with the effects of unwittingly filling up a buffer with unread serial data, which runs the risk of slowing down your sketch significantly. For some reason I expected there to be a lower layer in the serial protocol that handled stale buffers, but I guess it is up to us to ensure there isn’t significant packing of values going on.

Below are some photos and screenshots from the labs.

Screenshot 2024-10-28 at 22.24.18.png

^ Listing the various ports accessible to my machine.

IMG_1209.JPG

^ Setting up for the labs in the kitchen, late at night.

Screenshot 2024-10-28 at 22.24.58.png

^ cat on the port “file”.

Screenshot 2024-10-28 at 22.31.19.png

^ Printing data in various formats, including Binary and Octal.

Screenshot 2024-10-28 at 22.34.12.png

^ The same data formatted into CSV values.

Screenshot 2024-10-28 at 22.50.55.png

^ Reading serial data in P5, and drawing the data on a graph.