User Manual

Syntax:
if (condition1) {
// do Thing A
}
else if (condition2) {
// do Thing B
}
else {
// do Thing C
}
The usage of the statement is: if the logical expression in parentheses is true, execute the
statement in curly braces after if, if not, execute the statement in curly braces after the else. If
the state of the button is high, the LED pin outputs a high level and turn the LED on, else turn
LED off.
Demo Effect and Serial Print Result:
Pressing the button will turn the LED module on.
Breakout Guide
Use a Grove cable to connect the Grove LED to Seeeduino Lotus’s digital interface D4. Connect
the Grove Button to digital interface D6.
19
Grove Beginner Kit For Arduino®