// These constants won't change. They're used to give names // to the pins used: const int analogInPin = A0; // Analog input pin int sensorValue = 0; // value read from the pot int outputValue = 0; // value output #define NBREAD 3 #define LED 13 void setup() { pinMode(LED, OUTPUT); Serial.begin(9600); } void loop() { int foo; // accumulate NBREAD analog sample sensorValue = 0; for (foo=0; foo