Ever since I started with Arduino I wanted to create a cash register for my girl.
A “scanner” that triggers a buzzer and displays a (random) value on a LCD.
A keyboard where numbers can be pressed and calculated.
For the scanner I thought it would be a good idea to use a LDR (Photo resistor). Initially I hard coded a threshold value and when the value returned from the LDR was over that value, it triggered a buzzer. I then realized that working with the LDR depended a lot on the light – meaning it really mattered if I tested at day or at night with no daylight. I decided to add a potentiometer with which I can fine tune the threshold value later instead of uploading new code to the Arduino just to change a constant.
I also added a LED to the scanner that is on most of the time but turns off when the LDR value goes over the threshold value, ie when it is dark.
Ever since I saw this How-To: Shrinkify Your Arduino Projects I wanted to do a project using Arduino Attiny85s. And because I want to bring my son into the world of Arduino and he was eager to learn how to solder I was thinking of an easy project. With Christmas being around the corner I wanted to do some kind of a blinking Christmas tree.
The Attiny85 has 5 pins to use so I thought it would be cool to hook up a shift register to blink some LEDs. First thing I did was buying Attiny85s and 8-Bit Shift Register (SN74HC595N) on ebay. 10 pcs of Attiny85 cost me 12 USD and 10 shift registers were 2.50 USD.
The idea was to control 8 LEDs with the shift register. That would use up 3 pins on the Attiny85… so this left me with 2 more pins. I decided to use them kind of doing multiplexing LEDs. So I could hook up 2 LEDs per shift register output but they would not share the same connection to ground. This was controlled by two transistors that are connected to the two remaining pins on the arduino.