Hello, i am new to Microprocessor and that would mean the Arduino also. i am trying to figure out a way to make a starlight led display for my daughters ceiling. Was hoping to do 200+ leds, which at first i thought the best method would be a led matrix using a MAX or a 595. i wanted the light to be able to pulse, so i think i have learned enough to figure out that it is not possbile with 1) a digital output 2) a led matrix 3) either of those chips. would doing it analog be a nightmare? if not how would i go about it. i think it will be a while till i can get near doing this, but would love to know where to start looking so maybe i can start a smaller version (16 leds or something) thanks a bunch
i looked a little more tonight, and was wondering could it be done with digital with PWN? will that even work in a matrix?
You want to use PWM.
Double check the MAX7219’s datasheet. I thought it could do PWM on all of the LEDs.
4 of them will drive 256 LEDs which is what you want.
Make sure you take photos when its done. It’ll look bloody fantastic.
yeah read over the data sheet and it does to pwm over each pin, so that would be the way to go. Have NO idea where to begin with the code. the electrical is the easy part to me.
There is the basic MAX7219 code.
As for the twinkling, I'd probably go with the 'massive freaking array' technique
Two arrays, one for holding the current brightness value and the other for holding the current 'direction' (brighter or darker).
Every loop go through and increment or decrement the brightness value based on the direction value.
Pick a range of thresholds for darkness and lightness and rig it up to rand() to flip the direction value.
E.g. if its getting dimmer and its below 10 and rand is greater than 0.8 then make it start getting brighter.
That should give you a nice random 'twinkling' look.
I'd throw a nice large delay in the loop to make it twinkle nice and slowly.