Skip to content

Commit 8b301d7

Browse files
authored
Buttons' numeration changed
1 parent 5910bbd commit 8b301d7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

examples/TouchPads/Touch_and_LEDs/Touch_and_LEDs.ino

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ void loop() {
2222

2323
//Different types of touches
2424
//When you first touch it
25-
if (carrier.Button1.onTouchDown()) {
25+
if (carrier.Button0.onTouchDown()) {
2626
Serial.println("Touched Down Button 1");
2727
carrier.leds.setPixelColor(0, 20, 20, 20); // 'Off' pixel at tail
2828
carrier.leds.show(); // Refresh strip
@@ -33,7 +33,7 @@ void loop() {
3333
}
3434

3535
//When you release it
36-
if (carrier.Button2.onTouchUp()) {
36+
if (carrier.Button1.onTouchUp()) {
3737
Serial.println("Release Touch Button 2");
3838
carrier.leds.setPixelColor(1, 20, 20, 20); // 'Off' pixel at tail
3939
carrier.leds.show(); // Refresh strip
@@ -44,7 +44,7 @@ void loop() {
4444
}
4545

4646
//When it detects a change, down or up
47-
if (carrier.Button3.onTouchChange()) {
47+
if (carrier.Button2.onTouchChange()) {
4848
Serial.println("Changed Touch Button 3");
4949
carrier.leds.setPixelColor(2, 20, 20, 20); // 'Off' pixel at tail
5050
carrier.leds.show(); // Refresh strip
@@ -55,7 +55,7 @@ void loop() {
5555
}
5656

5757
//Normal, if it is being pressed
58-
if (carrier.Button4.getTouch()) {
58+
if (carrier.Button3.getTouch()) {
5959
Serial.println("Touching Button 4");
6060
carrier.leds.setPixelColor(3, 20, 20, 20); // 'Off' pixel at tail
6161
carrier.leds.show(); // Refresh strip
@@ -65,7 +65,7 @@ void loop() {
6565
carrier.leds.show(); // Refresh strip
6666
}
6767

68-
if (carrier.Button5.getTouch()) {
68+
if (carrier.Button4.getTouch()) {
6969
Serial.println("Touching Button 5");
7070
carrier.leds.setPixelColor(4, 20, 20, 20); // 'Off' pixel at tail
7171
carrier.leds.show(); // Refresh strip

0 commit comments

Comments
 (0)