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
ATTINY85
SN74HC595N Shift Register
RGB LED
Push Button
Photocell
Potentiometer
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.