Skip to content

Commit ee6e443

Browse files
committed
Version 1.0.0
1 parent b8c37aa commit ee6e443

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

examples/ExaustiveEncoder.ino

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ void setup() {
2525
Serial.begin(9600);
2626
versatile_encoder = new Versatile_RotaryEncoder(clk, dt, sw);
2727

28-
// Load to the encoder all nedded handle functions here
28+
// Load to the encoder all nedded handle functions here (up to 9 functions)
2929
versatile_encoder->setHandleRotate(handleRotate);
3030
versatile_encoder->setHandlePressRotate(handlePressRotate);
3131
versatile_encoder->setHandleHeldRotate(handleHeldRotate);
@@ -52,49 +52,49 @@ void loop() {
5252
// Implement your functions here accordingly to your needs
5353

5454
void handleRotate(int8_t rotation) {
55-
Serial.print("Rotated: ");
55+
Serial.print("#1 Rotated: ");
5656
if (rotation > 0)
5757
Serial.println("Right");
5858
else
5959
Serial.println("Left");
6060
}
6161

6262
void handlePressRotate(int8_t rotation) {
63-
Serial.print("Pressed and rotated: ");
63+
Serial.print("#2 Pressed and rotated: ");
6464
if (rotation > 0)
6565
Serial.println("Right");
6666
else
6767
Serial.println("Left");
6868
}
6969

7070
void handleHeldRotate(int8_t rotation) {
71-
Serial.print("Held and rotated: ");
71+
Serial.print("#3 Held and rotated: ");
7272
if (rotation > 0)
7373
Serial.println("Right");
7474
else
7575
Serial.println("Left");
7676
}
7777

7878
void handlePress() {
79-
Serial.println("Pressed");
79+
Serial.println("#4 Pressed");
8080
}
8181

8282
void handlePressRelease() {
83-
Serial.println("Press released");
83+
Serial.println("#5 Press released");
8484
}
8585

8686
void handleLongPress() {
87-
Serial.println("Long pressed");
87+
Serial.println("#6 Long pressed");
8888
}
8989

9090
void handleLongPressRelease() {
91-
Serial.println("Long pressed released");
91+
Serial.println("#7 Long pressed released");
9292
}
9393

9494
void handlePressRotateRelease() {
95-
Serial.println("Press rotate released");
95+
Serial.println("#8 Press rotate released");
9696
}
9797

9898
void handleHeldRotateRelease() {
99-
Serial.println("Held rotate released");
99+
Serial.println("#9 Held rotate released");
100100
}

0 commit comments

Comments
 (0)