problem with RGB LED chainable

Grove is a modulated, ready-to-use tool set.
Much like Lego, it takes a building block approach to assembling electronics.

Moderators: lily.li, violet, salmanfarisvp, jeremy882, crail.lyu969

Post Reply
issa76
Pre-kindergarten
Pre-kindergarten
Posts: 3
Joined: Tue Jul 02, 2019 5:49 am

problem with RGB LED chainable

Post by issa76 » Tue Jul 02, 2019 5:54 am

I have an RGB LED chainable GROVE and I have downloaded the library with it but I have a problem when I'am doing that:

#include <ChainableLED.h>
ChainableLED leds (6,7,1);
void setup() {
// put your setup code here, to run once:

}

void loop() {

leds.setColorRGB(0,255,0,0);
delay(1000);
leds.setColorRGB(0,0,0,0);
delay(1000);

}
With just this little program, the color of LED stays the same and I don't know why! There is no change

If someone can help me to understand that. Thanks a lot
I must say that programs that I've downloaded on the site are working but mine not!

bill.yu
Junior-7
Junior-7
Posts: 735
Joined: Mon Apr 02, 2018 11:05 am

Re: problem with RGB LED chainable

Post by bill.yu » Tue Jul 02, 2019 9:21 am

Hi there~

You missed the leds.init() inside of setup(). thanks.

Code: Select all

#include <ChainableLED.h>
ChainableLED leds (6,7,1);
void setup() {
  leds.init();
}

void loop() {

leds.setColorRGB(0,255,0,0);
delay(1000);
leds.setColorRGB(0,0,0,0);
delay(1000);

}

issa76
Pre-kindergarten
Pre-kindergarten
Posts: 3
Joined: Tue Jul 02, 2019 5:49 am

Re: problem with RGB LED chainable

Post by issa76 » Tue Jul 02, 2019 10:29 am

you seem to be wright!
I believe that it was not necessary to do that because on the program in the tuto the function was not written.

Thanks!

Post Reply