Skip to content

Instantly share code, notes, and snippets.

@tahnok
Created August 2, 2012 01:11
Show Gist options
  • Save tahnok/3232168 to your computer and use it in GitHub Desktop.
Save tahnok/3232168 to your computer and use it in GitHub Desktop.
Dashboard demo
int potPin1 = 0; // select the input pin for the potentiometer
int potPin2 = 1; // select the input pin for the potentiometer
int potPin3 = 2; // select the input pin for the potentiometer
int val1 = 0; // variable to store the value coming from the sensor
int val2 = 0; // variable to store the value coming from the sensor
int val3 = 0; // variable to store the value coming from the sensor
void setup() {
Serial.begin(9600);
}
void loop() {
val1 = analogRead(potPin1); // read the value from the sensor
val2 = analogRead(potPin2); // read the value from the sensor
val3 = analogRead(potPin3); // read the value from the sensor
Serial.print(val1);
Serial.print(",");
Serial.print(val2);
Serial.print(",");
Serial.print(val3);
Serial.println();
delay(200);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment