This example is for Wiring version 1.0 build 0100+. If you have a previous version, use the examples included with your software. If you see any errors or have comments, please let us know.
PotDemo by BREVIG http://alexanderbrevig.com
Display the intuitive way of using potentiomters when using this Hardware Abstraction class
Display the intuitive way of using potentiomters when using this Hardware Abstraction class
#include <Potentiometer.h> Potentiometer potentiometer = Potentiometer(2); //a Potentiometer at analog in 2 void setup() { Serial.begin(9800); Serial.println("Potentiometer example"); delay(2000); } void loop() { Serial.print("potentiometer.getValue() "); Serial.println(potentiometer.getValue(),DEC); Serial.print("potentiometer.getSector() "); Serial.println(potentiometer.getSector(),DEC); Serial.println(); delay(1000); }