Plugin 70 NeoPixel Clock

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Ian
Normal user
Posts: 15
Joined: 05 Aug 2018, 14:14

Plugin 70 NeoPixel Clock

#1 Post by Ian » 23 Sep 2018, 17:34

Hello all,

I see that theNeoPixel Clock ring is still in testing, but I've gone ahead and ordered a ring.

Just to have a look at the plugin in ESPEasy I set the plugin to NORMAL, and while compiling in Arduino ide, there is a warning in the void timeToStrip that the b_val is unused.

In fact, the assigned values of the different hands don't seem to tie-up to the colours for the hands, could someone take a look for me please as I'd love to get it running?

Regards
Ian

Code: Select all

uint32_t currentColor;
  uint8_t r_val, g_val, b_val;
  for (int i = 0; i < NUMBER_LEDS; i++) {	//draw the clock hands, adding the colors together
    if (i == hours) {	//hours hand is RED
      Plugin_070_pixels->setPixelColor(i, Plugin_070_pixels->Color(Plugin_070_brightness, 0, 0));
    }
    if (i == minutes) { //minutes hand is GREEN
      currentColor = Plugin_070_pixels->getPixelColor(i);
      r_val = (uint8_t)(currentColor >> 16);
      Plugin_070_pixels->setPixelColor(i, Plugin_070_pixels->Color(r_val, Plugin_070_brightness, 0));
    }
    if (i == seconds) {	//seconds hand is BLUE
      currentColor = Plugin_070_pixels->getPixelColor(i);
      r_val = (uint8_t)(currentColor >> 16);
      g_val = (uint8_t)(currentColor >>  8);
      Plugin_070_pixels->setPixelColor(i, Plugin_070_pixels->Color(r_val, g_val, Plugin_070_brightness));
    }
  }

Post Reply

Who is online

Users browsing this forum: Google [Bot], Semrush [Bot] and 39 guests