Hot answers tagged

2

Your problem may be in your count down code. Specifically this loop: for (int z = 5; z > -1; z--){ Z starts at 5, and you then try and access element 5 of a 5-element array. That sounds reasonable until you remember arrays are 0-based, so there is no element 5, only elements 0-4. So you're reading data that you shouldn't be reading. Just reading shouldn'...


1

From your description I think you are wanting this arrangement: simulate this circuit – Schematic created using CircuitLab There is no logical problem with that arrangement. However you must watch the total current being provided by each GPIO pin. You must not go above 40mA peak, and you should not go above 25mA sustained. It may be better to provide ...


1

I figured it out. There's two lines for FastLED.addLeds, and one needed to be commented out and the other enabled in order have a clock pin work. // FastLED.addLeds<LED_TYPE,DATA_PIN,COLOR_ORDER>(leds, NUM_LEDS).setCorrection(TypicalLEDStrip); FastLED.addLeds<LED_TYPE,DATA_PIN,CLK_PIN,COLOR_ORDER>(leds, NUM_LEDS).setCorrection(TypicalLEDStrip);


1

Here is the @Majenko code output The code same as the one posted in the other answer. You can find the simulation link here --> https://wokwi.com/arduino/projects/318609194610590292 I also hooked up a logic analyser and here is how it looks :) You can look how the Duty cyle is becoming larger afer every cycle.


1

The Gemma does not have a pin 6. FastLED.addLeds<NEOPIXEL, 6>(leds, 1); I changed to pin 2 and it works. FastLED.addLeds<NEOPIXEL, 2>(leds, 1);


Only top voted, non community-wiki answers of a minimum length are eligible