Problem with the Badge WX LED's

Dear all,

I am quite new to BlocklyProp and am programming the Badge WX. When I try to address LED 1 to blue, all four of the LED's are switched on bright white. I am able to address LED's 2 ,3 and 4 in the expected way.

The code is below and attached. Any help much appreciated
// ------ Libraries and Definitions ------
#include "simpletools.h"
#include "badgewxtools.h"
#include "ws2812.h"
#define RGB_COUNT 4

// ------ Global Variables and Objects ------
ws2812 *ws2812b;
int RGBleds[4];

// ------ Main Program ------
int main() {
  ws2812b = ws2812b_open();
  // Allow the Badge WX to be programmed over WiFi
  RGBleds[constrainInt(1, 1, RGB_COUNT) - 1] = 0x0000FF;
  ws2812_set(ws2812b, RGB_PIN, RGBleds, RGB_COUNT);

430 x 203 - 15K


Sign In or Register to comment.