This repository was archived by the owner on Sep 23, 2021. It is now read-only.
File tree 3 files changed +8
-8
lines changed
Beginners/EsploraLightCalibrator 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 20
20
// variables:
21
21
int lightMin = 1023 ; // minimum sensor value
22
22
int lightMax = 0 ; // maximum sensor value
23
- boolean calibrated = false ; // whether the sensor's been calibrated yet
23
+ bool calibrated = false ; // whether the sensor's been calibrated yet
24
24
25
25
void setup () {
26
26
// initialize the serial communication:
Original file line number Diff line number Diff line change 38
38
states are different, it means that the button was either
39
39
pressed or released.
40
40
*/
41
- boolean buttonStates[8 ];
41
+ bool buttonStates[8 ];
42
42
43
43
/*
44
44
This array holds the names of the buttons being read.
@@ -93,8 +93,8 @@ void loop() {
93
93
94
94
// Iterate through all the buttons:
95
95
for (byte thisButton = 0 ; thisButton < 8 ; thisButton++) {
96
- boolean lastState = buttonStates[thisButton];
97
- boolean newState = Esplora.readButton (buttons[thisButton]);
96
+ bool lastState = buttonStates[thisButton];
97
+ bool newState = Esplora.readButton (buttons[thisButton]);
98
98
if (lastState != newState) { // Something changed!
99
99
/*
100
100
The Keyboard library allows you to "press" and "release" the
Original file line number Diff line number Diff line change 33
33
/*
34
34
* this variable tells if the data-logging is currently active.
35
35
*/
36
- boolean active = false ;
36
+ bool active = false ;
37
37
38
38
/*
39
39
* this variable holds the time in the future when the sketch
@@ -57,7 +57,7 @@ unsigned long startedAt = 0;
57
57
* the "just-after-activation" stuff is run some time later than
58
58
* the code that says "be active now".
59
59
*/
60
- boolean justActivated = false ;
60
+ bool justActivated = false ;
61
61
62
62
63
63
/*
@@ -66,7 +66,7 @@ boolean justActivated = false;
66
66
* this variable and the current status of the switch, it means
67
67
* that the button was either pressed or released.
68
68
*/
69
- boolean lastStartBtn = HIGH;
69
+ bool lastStartBtn = HIGH;
70
70
71
71
/*
72
72
* Initialization code. The virtual USB keyboard must be
@@ -200,7 +200,7 @@ void activeDelay(unsigned long amount) {
200
200
* function is running.
201
201
*/
202
202
void checkSwitchPress () {
203
- boolean startBtn = Esplora.readButton (SWITCH_DOWN);
203
+ bool startBtn = Esplora.readButton (SWITCH_DOWN);
204
204
205
205
if (startBtn != lastStartBtn) {
206
206
if (startBtn == HIGH) { // button released
You can’t perform that action at this time.
0 commit comments