int ainPin = 2; // select the analog input pin void setup() { Serial.begin(9600); } void loop() { Serial.println(analogRead(ainPin), DEC); // read the value from the sensor and write to serial delay(1000); }