I had a terrible mind block this week, couldn't find any unique ideas. but at the end and as usual, an idea of a game just pop up in my mind ๐
so I searched all night for the closest idea and how to make it. there are plenty of projects like this and that's one of them
Tinker cad to simulate the circuit before implementing it
Arduino ide to write code and upload it to the board
Small breadboard to connect all components solderless / used mini one at the end to save space
Some jumpers
3 Push buttons to play the game
3 pin Switch instead of mini slide switch to be more user friendly
Arduino UNO r3 to control all the components with code
KY-017 Mercury tilt switch to second mode
16*2 lcd with I2C module
Pen cutter to cut precise pieces
and of course some cardboard to make the body.
scissors to โฆ cut ofcourse ๐
Tape
and glue gun to assembly
Mini drill to make some holes
First I put the 3 push buttons and the piezo
every component connected to the GND and the other terminal connected to Ardunio bins to take or give the signal
Second, I put a slide switch to control the mode and a tilt switch for the second mode
and at last, a screen to present the winner
Start the code by including liquid crystal i2c library, then define each pin with a name (variable) to easily change it if you want
Define the pin modes in void setup
then starting the void loop
simply, if the mode is switched to 1
then the tilt mode is activated, the LCD print Pick me up, and you will win if the tilt sensor get is on (1), then the LCD print you won and gives a peep sound
then finally a counter with a random number start and blinks the LCD with WAIT word till it repeats itself again
and the other mode has the same features but unlike the tilt sensor you have to click the button fast and then it the winner will show on screen (only the first one who pressed and if anyone else press after it won't affect anything)
then the same wait with random counter and repeat
Start with wiring and uploading the code and test all the functions
then cutting some cardboard for the body and put the components in there place, and choose the mini breadboard for saving the space
complete the wiring and put all the remain components
then collect the upside and body together with screws and nuts
at the end, doing some flexible parts to easily control it
and let's play!!
Didn't know how to connect KY-017 as a tilt sensor so i figure it out through this tutorial
second challenge was to connect the mini push button without a bread board, I figured out that when jumper plastic cover removed, I can connect the button legs (can tight the female a little bit in some cases)
I didn't know I can use the on/off switch instead of the slide switch ๐
and the last challenge was that the small button was not easy to play with, so I cut another peace of cardboard and make it flexible from the angels to make a big surface to press
That's the first mode
and that's the second mode
LET'S PLAAAY ๐ฎ
actually didn't win that much ๐ ๐