Created
April 6, 2017 18:20
-
-
Save rnarkus/f819a3bb7080f95a553d14bb44b2c444 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
int sensor1; | |
int sensor2; | |
char val; | |
void setup() { | |
Serial.begin(9600); | |
Serial.println("0"); | |
} | |
void loop() { | |
//send data only if requested | |
if(Serial.available() > 0){ | |
char input = Serial.read(); | |
sensor1 = analogRead(A0); | |
sensor2 = analogRead(A1); | |
Serial.print(sensor1); | |
Serial.print(","); | |
Serial.println(sensor2); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment