Skip to content

Commit 73bfcfa

Browse files
committed
Fix catchall example
1 parent 9ff4049 commit 73bfcfa

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

examples/Modulino_PlugNPlay/Modulino_PlugNPlay.ino

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ModulinoPixels leds;
66
ModulinoKnob encoder;
77
ModulinoDistance distance;
88
ModulinoMovement imu;
9-
ModulinoAir barometer;
9+
ModulinoPressure barometer;
1010

1111
void setup() {
1212

@@ -65,20 +65,20 @@ void loop() {
6565
leds.show();
6666
}
6767

68-
if (buttons.get(a, b, c)) {
69-
if (a) {
68+
if (buttons.update()) {
69+
if (buttons.isPressed(0)) {
7070
leds.set(1 + skip, RED, 15);
7171
buzzer.tone(440 + pitch, 1000);
7272
} else {
7373
leds.clear(1 + skip);
7474
}
75-
if (b) {
75+
if (buttons.isPressed(1)) {
7676
leds.set(2 + skip, BLUE, 15);
7777
buzzer.tone(880 + pitch, 1000);
7878
} else {
7979
leds.clear(2 + skip);
8080
}
81-
if (c) {
81+
if (buttons.isPressed(2)) {
8282
leds.set(3 + skip, GREEN, 15);
8383
buzzer.tone(1240 + pitch, 1000);
8484
} else {

src/Modulino.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,6 @@ extern ModulinoColor BLUE;
323323
extern ModulinoColor GREEN;
324324
extern ModulinoColor VIOLET;
325325
extern ModulinoColor WHITE;
326-
extern ModulinoClass Modulino;
327326

328327
/*
329328
TODO: These classes need to be ported to Modulino ecosystem, as per the tof_sensor example

0 commit comments

Comments
 (0)