|
35 | 35 | ** **
|
36 | 36 | *******************************************************************************************************************/
|
37 | 37 | #include <RotaryEncoder.h> // Include Encoder library //
|
38 |
| - |
39 |
| -/* //----------------------------------// |
40 | 38 | const uint8_t ROTARY_PIN_1 = 0; // Pin for left rotary encoder pin //
|
41 | 39 | const uint8_t ROTARY_PIN_2 = 1; // Pin for right rotary encoder pin //
|
42 | 40 | const uint8_t PUSHBUTTON_PIN = 7; // Pin for pushbutton connector pin //
|
43 | 41 | const uint8_t RED_PIN = 11; // Red LED PWM pin. Ground = FULL //
|
44 | 42 | const uint8_t GREEN_PIN = 10; // Green LED PWM pin. Ground = FULL //
|
45 |
| -const uint8_t BLUE_PIN = 9; // Blue LED PWM pin. Ground = FULL // |
46 |
| -*/ |
47 |
| -const uint8_t ROTARY_PIN_1 = 6; // Pin for left rotary encoder pin // |
48 |
| -const uint8_t ROTARY_PIN_2 = 7; // Pin for right rotary encoder pin // |
49 |
| -const uint8_t PUSHBUTTON_PIN = 2; // Pin for pushbutton connector pin // |
50 |
| -const uint8_t RED_PIN = 30; // Red LED PWM pin. Ground = FULL // |
51 |
| -const uint8_t GREEN_PIN = 8; // Green LED PWM pin. Ground = FULL // |
52 | 43 | const uint8_t BLUE_PIN = 9; // Blue LED PWM pin. Ground = FULL //
|
53 | 44 | //----------------------------------//
|
54 | 45 | EncoderClass Encoder(ROTARY_PIN_1, ROTARY_PIN_2, PUSHBUTTON_PIN, // Instantiate class defining all //
|
55 |
| - RED_PIN, GREEN_PIN, BLUE_PIN, true); // of the pins that are used // |
56 |
| - // Using HW debounce, internal pull-// |
57 |
| - // ups disabled // |
| 46 | + RED_PIN, GREEN_PIN, BLUE_PIN, false); // of the pins that are used // |
| 47 | + // If using HW de-bounce, internal // |
| 48 | + // pull-ups disabled else enabled // |
58 | 49 | //----------------------------------//
|
59 | 50 | void setup() { // Start One-Time run section //
|
60 | 51 | Serial.println(F("Starting Encoder Program...")); // //
|
|
0 commit comments