/* Analog input, serial output Reads an analog input pin, prints the results to the serial monitor. The circuit: * potentiometer connected to analog pin 0. Center pin of the potentiometer goes to the analog pin. side pins of the potentiometer go to +5V and ground created over and over again by Tom Igoe and everyone who's ever used Arduino */ void setup() { Serial.begin(115200); } void loop() { // read the analog input into a variable: int an0 = analogRead(0); int an1 = analogRead(1); int an2 = analogRead(2); int an3 = analogRead(3); int an4 = analogRead(4); int an5 = analogRead(5); // print the result: Serial.println(an0); Serial.print(" "); Serial.print(an1); Serial.print(" "); Serial.print(an2); Serial.print(" "); Serial.print(an3); Serial.print(" "); Serial.print(an4); Serial.print(" "); Serial.println(an5); // wait 10 milliseconds for the analog-to-digital converter // to settle after the last reading: delay(10); }