RGBW on an Attiny10 with a push button?

Hello, I have a bunch of attiny10. I was thinking of doing a RGBW Led project. I have a 5050 Led with Red, Green and blue. But it also has a White in it. The problem I have is that the attiny10 only has 4 pins that is useable or really 3 pins plus a reset pin that can be used as another GPIO pin and I need 5 pins all together because I need a push button to be added to select through the different colors. I'm not sure how to make this work on limited amount of pins. I need the community help to figure this out.

The RGBW led is not a Neopixel one, I wish it was. I have very limited room and can not put something to expand the pins. Not sure what to really do in putting a button on a led pin is it possible? Can someone please help me to figure this out? without the push button I will not beable to turn off the leds or change the selection of colors.

Joseph

choose the other controller

I'm sorry I phrase that wrong, I have changed it. This is currently the only micro processors I have available. I guess I'm working on my own flash light. Being only at 1k programming sketch and limited pins got me stuck a stumped.

If the pushbutton interrupts power to the ATTiny and it changes color at each power up?

EDIT: how do you want to drive the LEDs? Using transistors, or directly from I/O?

You can usually read a button on the same pin you using for PWM output to an led, by reading it during the off time

I'm trying to get the leds to run as low power as I can and still be bright enough. The only problem I would have with a transistor is taking up to much current on the battery. The battery is only 150ma.

Hey West I did not know that. So I can have the Led on and a push button on the same pin. That is great. Not sure how I would wire that up or code it. i'm guessing something like this for the wiring But not sure on the code part?

71QLt

But with different Resistors Values.

What about Charlieplexing 4 LEDs Using 3 pins + 1 free pin for button?

Hello the problem is Charlieplexing is that all of the Led's are tied together using common anode. it's in a single chip 5050.

Which actual LED do you have?
I was going to mention that charlieplexing wasn't possible because of the common anode, but a lot of the actual RGBW LEDs I looked up actually had separate connections for each side of each LED...