Good day.
Hope this is the right place for this.
I'm having an issue with my addressable LED.
I'm using a DFRobot Beetle, a board that is programmed like an Arduino Leonardo, and I want to use it to give the data for just a single addressable LED and later an LED ring.
I initially tried wiring the single LED directly to the data output on the Beetle, and the same with power and ground. For some reason I could only get the LED to display blue.
After a quick google, I found lots of posts telling me I was an idiot (and rightly so), so have now put in a resistor (270 ohms) in series on the data line and a capacitor (100 uF, 10V) in parallel across the +ve and gnd.
Despite all this, I can only get the LED to display blue! Any other RGB values where b=0 results in the LED remaining off.
Any suggestions why this could be?
I've attached images of the setup (pretty simple) and a closer view of the LED wiring. Below is the code I am using to test the LED.
All criticisms welcome, I never learnt electronics and I've been learning this as I go along!
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h>
#endif
#define stripPIN 11
#define stripPIXELS 1
Adafruit_NeoPixel strip = Adafruit_NeoPixel(stripPIXELS, stripPIN, NEO_RGB + NEO_KHZ800);
int led = 13;
void setup() {
pinMode(led, OUTPUT);
digitalWrite(led, HIGH);
strip.begin();
strip.setBrightness(255);
strip.show();
strip.fill((0,0,0));
strip.show();
delay(1000);
}
void loop() {
strip.fill((0,0,0));
strip.show();
digitalWrite(led, HIGH);
delay(1000);
strip.fill((255,0,0));
strip.show();
digitalWrite(led,LOW);
delay(1000);
}