Difference between revisions of "Pure Data"

From Digipool-Wiki
Jump to: navigation, search
(Serial Connection to Arduino)
Line 44: Line 44:
  
 
A clearer, more structured patch and a tutorial are still work in progress.
 
A clearer, more structured patch and a tutorial are still work in progress.
 +
 +
<br>
 +
 +
Screenshot of the PD-Patch
 +
 +
  
 
<br>
 
<br>

Revision as of 22:10, 2 January 2025

Easy Serial Connection to Arduino

The fastest and easiest way to receive Arduino (sensor) data with PD.


Screenshot of the PD-Patch

Pure-Data Easy-Serial-Connection-to-Arduino.png



Arduino Code


void setup() {
  Serial.begin(9600);
}

void loop() {
  int sensorValue = analogRead(A0);
  int sendValue = map(sensorValue, 0, 1024, 0, 255);
  Serial.write(sendValue);
  delay(100); 
}


Download both files as Zip

PD-ArduinoSimpleSerial.zip



Full Serial Connection to Arduino

This patch is based on Alexandros Drymonitis's code and works ideally to receive multiple data from the Arduino in full perfection with Pure Data.

A clearer, more structured patch and a tutorial are still work in progress.


Screenshot of the PD-Patch