We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aacd349 commit 53ab2feCopy full SHA for 53ab2fe
examples/EncoderSetter/EncoderSetter.ino
@@ -1,18 +1,25 @@
1
#include "Modulino.h"
2
3
ModulinoKnob encoder;
4
+ModulinoPixels leds;
5
6
void setup() {
7
// put your setup code here, to run once:
8
Serial.begin(115200);
9
Modulino.begin();
10
encoder.begin();
11
+ leds.begin();
12
}
13
14
void loop() {
15
int value = encoder.get();
- if (value > 7 || value < 0) {
16
+ if (value > 100 || value < 0) {
17
encoder.set(0);
18
19
+ value = encoder.get();
20
Serial.println(value);
21
+ leds.set(1, RED, value);
22
+ leds.set(2, GREEN, value);
23
+ leds.set(3, BLUE, value);
24
+ leds.show();
25
0 commit comments