Cereal Library (for super simple serial communication with Arduino)

Eric Sheffield's icon

Hi, everyone.
I recently had a need to further simplify serial communication from Arduino to Max and Pd for students in my department. Obviously, Maxuino has been around for a long time and is also a great option, but I was looking for something stripped down that let students implement only what they need, one step at a time.

Here's what I came up with: https://github.com/ersheff/Cereal-Library

This library uses a FUDI style messaging system so that the data coming out of the serial object (or comport in Pd) can immediately be used and routed in a Max-centric way, e.g. "slider 127". Header labels for these messages are created in the Arduino sketch. This means that there's probably a lot more data per message than necessary being sent over serial, but again, this is intended for simplicity and clarity, not efficiency!

Feel free to use, make suggestions, and/or ignore. Thanks!