1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-02-20 14:54:31 +01:00

Merge pull request #7649 from per1234/boolean-bool

Replace boolean type with bool in examples
This commit is contained in:
Martino Facchin 2018-08-20 17:31:54 +02:00 committed by GitHub
commit 0885c6147e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -19,7 +19,7 @@
*/ */
String inputString = ""; // a String to hold incoming data String inputString = ""; // a String to hold incoming data
boolean stringComplete = false; // whether the string is complete bool stringComplete = false; // whether the string is complete
void setup() { void setup() {
// initialize serial: // initialize serial:

View File

@ -44,7 +44,7 @@ int responseDelay = 5; // response delay of the mouse, in ms
int threshold = range / 4; // resting threshold int threshold = range / 4; // resting threshold
int center = range / 2; // resting position value int center = range / 2; // resting position value
boolean mouseIsActive = false; // whether or not to control the mouse bool mouseIsActive = false; // whether or not to control the mouse
int lastSwitchState = LOW; // previous switch state int lastSwitchState = LOW; // previous switch state
void setup() { void setup() {

View File

@ -46,7 +46,7 @@ const int quietKnock = 10;
const int loudKnock = 100; const int loudKnock = 100;
// variable to indicate if locked or not // variable to indicate if locked or not
boolean locked = false; bool locked = false;
// how many valid knocks you've received // how many valid knocks you've received
int numberOfKnocks = 0; int numberOfKnocks = 0;
@ -146,7 +146,7 @@ void loop() {
} }
// this function checks to see if a detected knock is within max and min range // this function checks to see if a detected knock is within max and min range
boolean checkForKnock(int value) { bool checkForKnock(int value) {
// if the value of the knock is greater than the minimum, and larger // if the value of the knock is greater than the minimum, and larger
// than the maximum // than the maximum
if (value > quietKnock && value < loudKnock) { if (value > quietKnock && value < loudKnock) {