Ever since I started with Arduino I wanted to create a cash register for my girl.
My requirements:
- 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.