Skip to content

Commit ad69b4c

Browse files
committed
ModulinoHub: add example
1 parent aae8e6d commit ad69b4c

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

examples/Modulino_Hub/Basic/Basic.ino

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#include <Modulino.h>
2+
3+
ModulinoHub hub;
4+
5+
ModulinoPixels light1(hub.port(1));
6+
ModulinoPixels light2(hub.port(2));
7+
8+
void setup() {
9+
Modulino.begin();
10+
light1.begin();
11+
light2.begin();
12+
}
13+
14+
void loop() {
15+
light1.set(0, BLUE, 50);
16+
light1.show();
17+
delay(100);
18+
light2.set(0, RED, 50);
19+
light2.show();
20+
delay(100);
21+
}

0 commit comments

Comments
 (0)