1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-08-09 22:24:14 +03:00

Revert "Small change to EsploraLightCalibrator example"

This reverts commit 7e5ca6244b.
This commit is contained in:
Tom Igoe
2012-12-23 20:29:43 -05:00
parent 7289ac6149
commit 957d7d480f

View File

@@ -32,7 +32,7 @@ void setup() {
void loop() { void loop() {
// if switch 1 is pressed, go to the calibration function again: // if switch 1 is pressed, go to the calibration function again:
if (Esplora.readButton(1) == HIGH) { if (Esplora.readButton(1) == LOW) {
calibrate(); calibrate();
} }
// read the sensor into a variable: // read the sensor into a variable:
@@ -64,7 +64,7 @@ void calibrate() {
Serial.println("While holding switch 1, shine a light on the light sensor, then cover it."); Serial.println("While holding switch 1, shine a light on the light sensor, then cover it.");
// calibrate while switch 1 is pressed: // calibrate while switch 1 is pressed:
while(Esplora.readButton(1) == HIGH) { while(Esplora.readButton(1) == LOW) {
// read the sensor value: // read the sensor value:
int light = Esplora.readLightSensor(); int light = Esplora.readLightSensor();