Is this possible with an ATTINY85/Shift Register? RGB LED MoodLamp Project

So I’m relatively new to Arduino, etc., so I’m learning as I go. The best way for me to learn is by the hands-on approach while building a project that interests me.

With that in mind, I’m wanting to build an RGB LED MoodLamp, which I’ve got working by hooking it up to my Uno, but want to downsize it/build it for cheaper as I will eventually make a few of these for gifts.

My plan was to use some ATTINY85’s that I have laying around, but with the amount of I/O’s that I need, it won’t have enough pins. To get around that, I plan on using a Shift Register (SN74HC595N).

My question is, with the approach and details below, is it possible with the ATTINY85/Shift Register? If it’s not, I’ll probably buy some ATMEGA328’s that are used in the Uno, but would prefer to use the ATTINY85’s up.

Parts I’ll be using

SN74HC595N Shift Register
Push Button
Other Misc. Parts

Basically, the lamp will automatically turn on when the room is dark enough via the Photocell and the lamp will have 3 modes, which can be cycled through by pressing the button.

Full Spectrum Range

This mode ranges through the spectrum of colors.
The potentiometer will be used to change the speed in which it cycles through the spectrum

Solid Color

The potentiometer will be used to change the color

Candle Flicker

No other parts needed to run this mode

Here are the calls that I’m using for the I/O’s

Turn LED On/Off with Photocell - digitalWrite(PIN, LOW/HIGH)
Read Potentiometer Value - analogRead()
Read Photocell Value - analogRead();
Read Button State - digitalRead()
Spectrum Color Mode - analogWrite(PIN, brightness[0-255])
Solid Color Potentiometer Change - analogWrite(PIN, brightness[0-255])
Candle Flicker Mode - analogWrite(PIN, brightness[0-255])

I’ve attached an image of the breadboard wireup using Fritzing. The breadboard on the right is my 1st attempt at diagramming the approach that I’ll take, so I may need to move some of the jumper wires between the ATTINY85 and the Shift Register.

Also, I can post my code that I wrote up for the Uno version if needed.

Thanks in advance! I look forward to contributing on here now that I’ve gotten into this mess.

With a shift register you can't dim the LEDs independently. That means your color choices are limited (3 primary colors gives you 7 color combinations, plus "off") and you won't be able to slowly fade/change colors.

You can dim the LEDs with a shift register if you use the shiftPWM libary.

Thanks, I’ll take a look at that library. Since I’ve been itching to put this thing together, my 1st prototype will not include the Photocell so that I have enough inputs on the ATTINY while I wait for other parts to arrive.

Remember, once your program is debugged, you can fuse the attiny to turn the reset pin into a 6th gpio (you can't reprogram it without a high voltage programmer from that point though).