Hide minor edits - Show changes to markup
readSlider()
Esplora.readSlider()
Read the analog value of the linear potentiometer. It returns a valure in the range from 0 to 1023.
Reads the value from the linear potentiometer as a 10-bit number. This means that it will map input voltages between 0 and 5 volts into integer values between 0 and 1023. This yields a resolution between readings of: 5 volts / 1024 units or, .0049 volts (4.9 mV) per unit.
int : The linear potentiometer position in the range from 0 to 1023.
int : The linear potentiometer's position, mapped to a value between 0 and 1023.
Serial.begin(9600);
Serial.begin(9600);
int value = Esplora.readSlider(); Serial.println(value);
delay(1000); }
int value = Esplora.readSlider(); Serial.println(value);
delay(1000);
}
Read the analog value of the linear potentiometer. It return a valure in the range from 0 to 1023.
Read the analog value of the linear potentiometer. It returns a valure in the range from 0 to 1023.
The linear potentiometer position in the range from 0 to 1023.
int : The linear potentiometer position in the range from 0 to 1023.
[@
(:source lang=arduino tabwidth=4:)
@]
(:sourceend:)
Read the analog value of the linear potentiometer. It return a valure in the range from 0 to 1023.
readSlider()
none
The linear potentiometer position in the range from 0 to 1023.
void setup()
{
Serial.begin(9600);
}
void loop()
{
int value = Esplora.readSlider();
Serial.println(value);
delay(1000);
}