Problem with the Badge WX LED's
Anding
Posts: 5
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
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() { badge_setup(); ws2812b = ws2812b_open(); // Allow the Badge WX to be programmed over WiFi high(17); RGBleds[constrainInt(1, 1, RGB_COUNT) - 1] = 0x0000FF; ws2812_set(ws2812b, RGB_PIN, RGBleds, RGB_COUNT); }
Comments
Maybe something wrong with LED 1 on your badge.
Mike