Go Down

Topic: LED Matrix (Read 362 times) previous topic - next topic

maxl0412

Hello,

I tried to make like single raindrops on the 8x8 LED Matrix with 2 dots falling from top to bottom.
The upper LED should be a littlebit dimmed.
Code: [Select]
#include <WEMOS_Matrix_LED.h>

MLED mled(5); //set intensity=5

void setup() {

 
}

void loop() {
int y = random(0,8);
  for(int x=0;x<8;x++)
  {
         int i = 2;
    mled.intensity=i + 2;
        mled.dot(x,y);


       
        int xi = x - 1;
        if (xi != -1){
       
        mled.intensity=i;
        mled.dot(xi,y);
       
        mled.display();
       

        }
       
        delay(200);

        mled.dot(x,y,0);//clear dot
         mled.dot(xi,y,0);
        mled.display();
        delay(100);         
  }

}

Somehow they both still have the same intensity and i don´t know why.

---

Also i´m somehow stuck with my idea to make 2 raindrops fall at the same time. Could someone give me a hint?

ballscrewbob

Which 8x8 matrix are you using (link to source or schematic required)

Dont forget there are current limitations on almost all Arduino boards.
External power sources to LED arrays are quite often needed.

It may not be the answer you were looking for but its the one I am giving based on either experience, educated guess, google or the fact that you gave nothing to go with in the first place so I used my wonky crystal ball.

Go Up