How to Make LEDs Brighter or Dimmer Using PICAXE 40x1

yeah but you can’t run them
yeah but you can’t run them simultaneously, since it is a software-pwm, right?

thats gonna cost you a
thats gonna cost you a fortune in LEDs, lol

200 tri color LEDs is about
200 tri color LEDs is about $50 with shipping included.

where are you ordering them
where are you ordering them from? At my local radioshack its like $3 for one.

Why not? Imagine for each

Why not? Imagine for each LED you have a variable called "brightness"that is stored as a percentage. Make a loop that runs 100 times, which itself loops continuously. Each time through the loop it checks all LEDs brightness variables, if loopCount >= brightness if TRUE then turn the LED off, if FALSE then turn the LED on.

So if LED_As brightness is 0 and LED_Bs brightness is 50, LED_A will never turn on because loopCount >= brightness will be true even on the first loop (0 >= 0 = TRUE). But for LED_B the first 50 times through the loop the LED will be on because (loopCount >= 50 = FALSE) but the last 50 times will be true and turn the LED off.

Ideally the loop would run very quickly, fast enough that human eyes cant see the flicker. ALthough I wonder if putting a small cap across the leads would help?

eBay they come from Hong
eBay they come from Hong Kong.

yes yes, i just meant having
yes yes, i just meant having all the PWMs running at the same time :slight_smile: You can’t do that right?

Can anyone suggest a good
Can anyone suggest a good processor that can handle this (keep in mind I will require at least 48 out pins, 36 of which must be able to handle some sort of dimming for the LEDs). I have wanted to learn a new PIC I guess now is the time :wink: Since I need so many out pins the PIC will need to be able to easily communicate with others and play nicely. I should have the LEDs next week sometime.

Not looking for a massive
Not looking for a massive processor. I eventually want to branch out beyond picaxe so if I can use this project to do that it kills 2 birds with one stone. I eventually want to play with ardruino and others. If they would fit this project then great. If not I can get a chip that will do it with a picaxe.