Skip to content

Commit 5c6a4de

Browse files
committed
Buttons: update firmware and independent setLeds
1 parent 53ab2fe commit 5c6a4de

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

examples/EncoderSetter/EncoderSetter.ino

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22

33
ModulinoKnob encoder;
44
ModulinoPixels leds;
5+
ModulinoButtons buttons;
56

67
void setup() {
78
// put your setup code here, to run once:
89
Serial.begin(115200);
910
Modulino.begin();
1011
encoder.begin();
1112
leds.begin();
13+
buttons.begin();
1214
}
1315

1416
void loop() {
@@ -22,4 +24,6 @@ void loop() {
2224
leds.set(2, GREEN, value);
2325
leds.set(3, BLUE, value);
2426
leds.show();
27+
buttons.update();
28+
buttons.setLeds(buttons.isPressed(0), buttons.isPressed(1), buttons.isPressed(2));
2529
}

src/fw.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ unsigned char node_base_bin[] = {
5858
0x96, 0xfd, 0x63, 0x4b, 0x1b, 0x78, 0x74, 0x2b, 0x00, 0xd1, 0x6e, 0xe0,
5959
0x06, 0xd8, 0x3c, 0x2b, 0x12, 0xd0, 0x6c, 0x2b, 0x00, 0xd1, 0xa1, 0xe0,
6060
0x1d, 0xb0, 0x30, 0xbd, 0x76, 0x2b, 0x64, 0xd0, 0x7c, 0x2b, 0xf9, 0xd1,
61-
0xa0, 0x20, 0x75, 0x3b, 0x03, 0x93, 0x03, 0xa9, 0x06, 0x3b, 0xc0, 0x05,
61+
0xa0, 0x20, 0x3d, 0x3b, 0x03, 0x93, 0x03, 0xa9, 0x3e, 0x3b, 0xc0, 0x05,
6262
0x04, 0x93, 0x01, 0xf0, 0x59, 0xf8, 0xef, 0xe7, 0x0c, 0x22, 0x00, 0x21,
6363
0x68, 0x46, 0x02, 0xf0, 0x76, 0xfd, 0x1c, 0x22, 0x00, 0x21, 0x08, 0xa8,
6464
0x02, 0xf0, 0x71, 0xfd, 0x34, 0x22, 0x00, 0x21, 0x0f, 0xa8, 0x02, 0xf0,
@@ -172,10 +172,10 @@ unsigned char node_base_bin[] = {
172172
0x74, 0x2b, 0x42, 0xd0, 0x07, 0xd8, 0x3c, 0x2b, 0x25, 0xd0, 0x6c, 0x2b,
173173
0x49, 0xd0, 0x00, 0x22, 0x33, 0x4b, 0x1a, 0x70, 0xa3, 0xe7, 0x76, 0x2b,
174174
0x37, 0xd0, 0x7c, 0x2b, 0xf7, 0xd1, 0x53, 0x1e, 0x9a, 0x41, 0xa0, 0x20,
175-
0x01, 0x21, 0xd2, 0xb2, 0xc0, 0x05, 0x00, 0xf0, 0x6b, 0xfe, 0x2d, 0x4d,
176-
0xa0, 0x20, 0x6a, 0x78, 0x02, 0x21, 0x53, 0x1e, 0x9a, 0x41, 0xc0, 0x05,
175+
0x08, 0x21, 0xd2, 0xb2, 0xc0, 0x05, 0x00, 0xf0, 0x6b, 0xfe, 0x2d, 0x4d,
176+
0xa0, 0x20, 0x6a, 0x78, 0x10, 0x21, 0x53, 0x1e, 0x9a, 0x41, 0xc0, 0x05,
177177
0xd2, 0xb2, 0x00, 0xf0, 0x61, 0xfe, 0xaa, 0x78, 0xa0, 0x20, 0x53, 0x1e,
178-
0x9a, 0x41, 0x04, 0x21, 0xd2, 0xb2, 0xc0, 0x05, 0x00, 0xf0, 0x58, 0xfe,
178+
0x9a, 0x41, 0x20, 0x21, 0xd2, 0xb2, 0xc0, 0x05, 0x00, 0xf0, 0x58, 0xfe,
179179
0xdb, 0xe7, 0x04, 0x22, 0x07, 0xa8, 0x02, 0xf0, 0xe9, 0xfa, 0x04, 0x22,
180180
0x25, 0x49, 0x30, 0x00, 0x02, 0xf0, 0xe4, 0xfa, 0x00, 0xf0, 0x6e, 0xf9,
181181
0x09, 0x9c, 0x07, 0x99, 0x04, 0x19, 0x22, 0x48, 0xff, 0xf7, 0x38, 0xfc,

0 commit comments

Comments
 (0)