Skip to content
This repository was archived by the owner on Sep 23, 2021. It is now read-only.

Commit 2658644

Browse files
authored
Merge pull request #2 from per1234/boolean-bool
Replace boolean type with bool in examples
2 parents 6ba3028 + d2ba85a commit 2658644

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

examples/Beginners/EsploraLightCalibrator/EsploraLightCalibrator.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
// variables:
2121
int lightMin = 1023; // minimum sensor value
2222
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
2424

2525
void setup() {
2626
// initialize the serial communication:

examples/Experts/EsploraKart/EsploraKart.ino

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
states are different, it means that the button was either
3939
pressed or released.
4040
*/
41-
boolean buttonStates[8];
41+
bool buttonStates[8];
4242

4343
/*
4444
This array holds the names of the buttons being read.
@@ -93,8 +93,8 @@ void loop() {
9393

9494
// Iterate through all the buttons:
9595
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]);
9898
if (lastState != newState) { // Something changed!
9999
/*
100100
The Keyboard library allows you to "press" and "release" the

examples/Experts/EsploraTable/EsploraTable.ino

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
/*
3434
* this variable tells if the data-logging is currently active.
3535
*/
36-
boolean active = false;
36+
bool active = false;
3737

3838
/*
3939
* this variable holds the time in the future when the sketch
@@ -57,7 +57,7 @@ unsigned long startedAt = 0;
5757
* the "just-after-activation" stuff is run some time later than
5858
* the code that says "be active now".
5959
*/
60-
boolean justActivated = false;
60+
bool justActivated = false;
6161

6262

6363
/*
@@ -66,7 +66,7 @@ boolean justActivated = false;
6666
* this variable and the current status of the switch, it means
6767
* that the button was either pressed or released.
6868
*/
69-
boolean lastStartBtn = HIGH;
69+
bool lastStartBtn = HIGH;
7070

7171
/*
7272
* Initialization code. The virtual USB keyboard must be
@@ -200,7 +200,7 @@ void activeDelay(unsigned long amount) {
200200
* function is running.
201201
*/
202202
void checkSwitchPress() {
203-
boolean startBtn = Esplora.readButton(SWITCH_DOWN);
203+
bool startBtn = Esplora.readButton(SWITCH_DOWN);
204204

205205
if (startBtn != lastStartBtn) {
206206
if (startBtn == HIGH) { // button released

0 commit comments

Comments
 (0)