“You need to shoot as many targets as possible. You get one point and one more shot for each destroyed Target
The object of the game is to shoot the LDR (target) under the active LED with a light beam from a laser pointer.
This time I will show you how to make a simple but addictive game for one or more players. The game consists of the following:
We have five blue LEDs that light at random order and intervals. Under each LED is a photoresistor that is actually a target.
The object of the game is to shoot the LDR (target) under the active LED with a light beam from a laser pointer. As soon as you hit this LDR, the corresponding LED goes out. You need to shoot as many targets as possible. You get one point and one more shot for each destroyed Target (at the beginning of the game you have 5 points). The game is lost if you fail to shoot down a target (too slow) or if you run out of ammunition. The course of the game is accompanied by appropriate sounds for the start, hit the target, or end of the game. Basically, the code is taken from the elektro.turanis.de site, and I added an I2C LCD display so that instead of the serial monitor, the result is displayed on the display, so now this is a standalone device.
Otherwise, the device is very simple to make and contains only a few components:
- Arduino nano microcontroller
- 16x2 I2C LCD display
- 5 LEDs
- 5 LDR resistors
- momentary switch
- and 10 resistors”