by on
Intermediate Arduino Class

The simplest interaction between the arduino and pure data is by using the comport object in pure data and sending data to it using the Arduino’s Serial object. Below is an illustration of two way communication between pure data and the arduino.  On the right the comport object receives values as bytes and puts them on the first vslider. The values from the second slider are sent to the comport. On the left you can see the code for the arduino. The arduino reads the potentiometer and if the value has changed writes the value (scaled to fit in a byte) to the serial port. Then it checks to see if a value has been sent to it and if its different from the last value it sets the led pins pwm value accordingly.

 

8 bit wonder comms

 

Leave a Reply

  • (will not be published)