Vermes
Advanced Member level 4
This is a simple game based on microcontroller Attiny2313. It consists in the fact that the system randomizes a number from the range of 0-99, and your task is to guess what number it is. The way of entering numbers was carried out using a transmitter and an IR receiver. It means any remote control with RC5 support (IR receiver is sticked on the housing). When you press a button on the remote control, it is showed on the display, and you receive a message if the number you chose is greater or smaller than the randomized number.
In order to avoid randomizing the same number each time, you have to set the timer to turn on after connecting the power. Then welcome screen appears and waits for you to press „1” button. It is not possible that everyone presses the button after the same period of time, so the number is different each time.
After pressing a button with number, the program waits for a short time, and when you do not press another button in that time, it displays that one number (for example 5). It was done to make it possible to enter numbers smaller than 10. When you press another button (4) in that short time, the number will be for example 54.
The game was mounted on a universal board and closed in a housing. Code was written in Bascom.
The device is powered by +5V, and the IR receiver is TSOP31236, but you can use other as well (it is only important that they must be 36kHz).
Pictures:
And a video:
Link to original thread (useful attachment) - Gra na uC z użyciem pilota