Difference between revisions of "Pure Data"

From Digipool-Wiki
Jump to: navigation, search
(Created page with "= Easy Serial Connection to Arduino = The fastest and easiest way to receive Arduino (sensor) data with PD. <br> == Screenshot of the PD-Patch == <br> == Arduino Code...")
 
(Screenshot of the PD-Patch)
Line 7: Line 7:
 
== Screenshot of the PD-Patch ==
 
== Screenshot of the PD-Patch ==
  
 
+
[[File:Pure-Data Easy-Serial-Connection-to-Arduino.png]]
  
  

Revision as of 18:54, 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