In this tutorial we present how you can implement the transmission of 8-bit integers from Arduino to Pure Data (Pd).
Just to start, this is the sketch used for Arduino. In the setup function we initialize the serial connection, while in the loop we increase the value variable, making sure that it is always between 0 and 255, and we send its numeric value over the serial connection.
This is the patch for Pure Data that allows to receive the data. The comport object manages the serial communication with Arduino. From the output on the left of comport you get the data sent from the Arduino in the form of integers from 0 to 255. Comport is an object not included in the Pd Vanilla distribution that can be downloaded from this link.