I have an arduino application handling a rotary encoder. In the script, I'm using PWM to output values to pin 7 on the Arduino Mega. I then have Pin 7 and Ground on the Arduino going to Analog Pin 7 on the Bela and the Ground near the analog input.
Here is the line from the Arduino script that's controlling the power value.
analogWrite(analogWritePin, value); // analogWrite values from 0 to 255
If I plug this into a multimeter, the Arduino is properly outputing the 5v power based on my rotary encoder.
I'd like to use that to control the volume of a sound file looping in PureData. Here is what I have now:
Anyway to do this? Right now I'm not getting any sound out of the PureData sketch.