Last active
April 23, 2019 14:23
-
-
Save Jl9549/9b9cd2ee1869ed0cb842f084ced578f2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void setup() { | |
Serial.begin(9600); | |
} | |
void loop() { | |
int sensor1 = analogRead(A0); | |
int sensor2 = analogRead(A1); | |
// int sensor3 = analogRead(A2); | |
// keep this format | |
Serial.print(sensor1); | |
Serial.print(","); // put comma between sensor values | |
Serial.print(sensor2); | |
// Serial.print(","); | |
// Serial.print(sensor3); | |
Serial.println(); // add linefeed after sending the last sensor value | |
// too fast communication might cause some latency in Processing | |
// this delay resolves the issue. | |
delay(100); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment