mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-30 16:24:09 +03:00
Changed analog references to use new A0 through A5 notation
This commit is contained in:
@ -14,6 +14,7 @@
|
||||
* 10K resistor from analog in 0 to ground
|
||||
|
||||
created 1 Jul 2009
|
||||
modified 4 Sep 2010
|
||||
by Tom Igoe
|
||||
|
||||
This example code is in the public domain.
|
||||
@ -32,7 +33,7 @@ void setup() {
|
||||
|
||||
void loop() {
|
||||
// read the sensor:
|
||||
int sensorReading = analogRead(0);
|
||||
int sensorReading = analogRead(A0);
|
||||
// map the sensor range to a range of four options:
|
||||
int range = map(sensorReading, sensorMin, sensorMax, 0, 3);
|
||||
|
||||
|
Reference in New Issue
Block a user