Reference for Wiring version 1.0 Build 0100+ If you have a previous version, use the reference included with your software. If see any errors or have any comments, let us know.
Class | Potentiometer |
---|---|
Name | getValue() |
Examples | #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); } |
Description | Get the current value of the Potentiometer. This is a wrapper around the analogRead core call. |
Syntax | getValue() |
Returns | The value of the Potentiometer (0,1023) |
Usage | Application |