diff --git a/Examples/StandardColors/StandardColors.ino b/Examples/StandardColors/StandardColors.ino index 7f77d34..50e9b8e 100644 --- a/Examples/StandardColors/StandardColors.ino +++ b/Examples/StandardColors/StandardColors.ino @@ -35,26 +35,17 @@ ** ** *******************************************************************************************************************/ #include // Include Encoder library // - -/* //----------------------------------// const uint8_t ROTARY_PIN_1 = 0; // Pin for left rotary encoder pin // const uint8_t ROTARY_PIN_2 = 1; // Pin for right rotary encoder pin // const uint8_t PUSHBUTTON_PIN = 7; // Pin for pushbutton connector pin // const uint8_t RED_PIN = 11; // Red LED PWM pin. Ground = FULL // const uint8_t GREEN_PIN = 10; // Green LED PWM pin. Ground = FULL // -const uint8_t BLUE_PIN = 9; // Blue LED PWM pin. Ground = FULL // -*/ -const uint8_t ROTARY_PIN_1 = 6; // Pin for left rotary encoder pin // -const uint8_t ROTARY_PIN_2 = 7; // Pin for right rotary encoder pin // -const uint8_t PUSHBUTTON_PIN = 2; // Pin for pushbutton connector pin // -const uint8_t RED_PIN = 30; // Red LED PWM pin. Ground = FULL // -const uint8_t GREEN_PIN = 8; // Green LED PWM pin. Ground = FULL // const uint8_t BLUE_PIN = 9; // Blue LED PWM pin. Ground = FULL // //----------------------------------// EncoderClass Encoder(ROTARY_PIN_1, ROTARY_PIN_2, PUSHBUTTON_PIN, // Instantiate class defining all // - RED_PIN, GREEN_PIN, BLUE_PIN, true); // of the pins that are used // - // Using HW debounce, internal pull-// - // ups disabled // + RED_PIN, GREEN_PIN, BLUE_PIN, false); // of the pins that are used // + // If using HW de-bounce, internal // + // pull-ups disabled else enabled // //----------------------------------// void setup() { // Start One-Time run section // Serial.println(F("Starting Encoder Program...")); // // diff --git a/RotaryEncoder.cpp b/RotaryEncoder.cpp index 171ae66..fca2348 100644 --- a/RotaryEncoder.cpp +++ b/RotaryEncoder.cpp @@ -209,10 +209,10 @@ void EncoderClass::SetEncoderValue(const int16_t NewValue = 0) { // ** then gives us an identical trigger speed but different trigger point to the millis() function which triggers ** ** when the Timer0 overflows. The same setup is done for the TIMER0_COMPB_vect but that is set to trigger halfway ** ** along the full range of 255 at 192, thus giving an interrupt rate of 2 times per milli second. The FadeSpeed ** -** equates to how many milliseconds ther are between incremental fades, the fastest is 1 which is every 1/2 milli-** -** second, 2 is every millisecond, etc. Each time the trigger is reached all of the LED values which are not "off"** -** are dimmed by 1/255 of the total value. A setting of 10 would fade the LEDs from full on to OFF 1/255 of their ** -** brightness in 1.28 seconds ** +** equates to how many milliseconds there are between incremental fades, the fastest is 1 which is every 1/2 ** +** millisecond, 2 is every millisecond, etc. Each time the trigger is reached all of the LED values which are not ** +** "off" are dimmed by 1/255 of the total value. A setting of 10 would fade the LEDs from full on to OFF 1/255 of ** +** their brightness in 1.28 seconds ** *******************************************************************************************************************/ void EncoderClass::SetFadeRate(const uint8_t FadeSpeed) { // // _FadeMillis = FadeSpeed; // Set the private variable to value//