Make throwing fun! Build your very own electronic game. Players will try to land a wastepaper into a cup or container.
- Using light sensor as analog input and buzzer as digital output module
- Use conditional flags and loops to ensure there are no false triggers (e.g. covering the sensors will not increase the score indefinitely)
To download the code below, kindly right click to save file.
What Will Happen?
The light sensor is to be embedded into the base of the cup or container. Each time a paper ball lands inside, the sensor will be covered and the LED grid will display a score increment. The first to reach 5 points wins. The buzzer is used to provide additional indication each time someone scores.
- Change existing threshold value (500) for different ambient illumination.
- Add musical tunes before and after the game.