// Reading the analog value of the pin connected // to the pontentiometer on EduBase V2 board // and dipslay it on Serial Monitor // Before you do this, test the Serial Monitor program // On EduBase V2, the potentiometer is connected to pin A1. // The ADC has 10-bit resolution for AVR and default is 10-bit in Arduino. */ // On Tools click on Serial Monitor and observe the changes // as you turn the blue potentiameter const int pot = A1; void setup() { Serial.begin(9600); Serial.println("Potentiometer:"); } void loop() { /* read the voltage from ADC */ int potValue = analogRead(pot); /* write it to the Serial monitor */ Serial.print(" potentiometer value = "); Serial.println(potValue, DEC); delay(100); }