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.
^ Listing the various ports accessible to my machine.
^ Setting up for the labs in the kitchen, late at night.
^ cat
on the port “file”.
^ Printing data in various formats, including Binary and Octal.
^ The same data formatted into CSV values.
^ Reading serial data in P5, and drawing the data on a graph.