I’m trying to create a rain effect on a 8X5 array on neopixles. So far I’v gotten two rows to move the white LED down to the end and loop back to the top. The issue that I’m having is that the moving leds are not in sync. the first row moves much slower that the second row. How do I get the leds in sync so they both move at the same speed and side by side? This is what I have so far. fastled-rain-snow-effect/new-rain.ino at master · orangeofdoom/fastled-rain-snow-effect · GitHub
#include “FastLED.h” // This sketch uses the FastLED library
#define DATA_PIN 6 // Data connected to Digital Pin 2 on the Arduino
#define LED_TYPE WS2811 // This LED strip uses the WS2801 chipset. #define NUM_LEDS 40
@Peter_Buelow Thanks for the reply, unfortunately I am very new to programming and I don’t quite understand how to make the changes you suggested. I tried to implement what you said and ended up with this
void loop() {
// Move a single white led
for(int Row1 = 0; Row1 < 8; Row1 = Row1 + 1) for(int row2 = 8; row2 <16; row2 = row2 +1) {
leds[Row1] = CRGB::White; leds[row2] = CRGB :: White;}
delay(1000);
FastLED.show();
@Brian_Lewis yes I was looking for your rain animation to help him- but couldn’t remember exactly who posted it. Planned to pull it out of my arduino folder when I got on the computer and totally forgot.
@JeffJerzy1 Are you trying to get two LEDs to move from the top down or just one at a time? Comments in your code say 2 but I want to make sure. Is your array 8 Wide X5 High? Is it a serpentine layout?
@Brian_Lewis Sorry for the delay I’ve been very busy. I’m trying to get a led to move from right to left along each row. I want to get all 5 rows moving at the same time. thanks for the help.
@JeffJerzy1 I am done with the code for this. I want to test it before I give it to you but unfortunately I have an 8 hour drive home so you’ll have to wait until later tonight or tomorrow for it.