Page 1 of 2

Tetripidation - Tetris with a shake/tilt sensor

Posted: Tue Jun 05, 2018 1:02 pm
by Ampersand
Trepidation
noun
1. tremulous fear, alarm, or agitation
2. trembling or quivering movement

The idea is a small device that plays Tetris with left and right buttons that you can shake to rotate pieces.
Having to shake the device will hopefully change the potentially relaxing game of Tetris into a frantic game of furiously shaking about to get your piece into the right orientation before it lands. Nice and stressful.

Parts so far:
ESP32 £7.59
https://www.amazon.co.uk/gp/product/B07 ... UTF8&psc=1

OLED screen £6.99 (didn't want to wait for China post)
https://www.amazon.co.uk/gp/product/B01 ... UTF8&psc=1

Tilt sensor £2.19
https://www.ebay.co.uk/itm/SW-420-Vibra ... 2749.l2649


I've never done anything with Arduino before, so this is all new to me. Since there's no way I'm going to be able to code Tetris, I'm going to use this guy's code and figure out how to make it do what I need http://www.instructables.com/id/Tetris- ... uino-Nano/ if that means it doesn't count towards the competition ¯\_(ツ)_/¯ i'll at least learn something and end up with a new way to play Tetris (or fail miserably).

Initial plans:
SpoilerShow
Tetripidation plans.png
Tetripidation plans.png (50.88 KiB) Viewed 14500 times

Re: Tetripidation - Tetris with a shake/tilt sensor

Posted: Tue Jun 05, 2018 1:40 pm
by wermy
Awesome! :D In my opinion anything open-source is fair game to draw from.

Re: Tetripidation - Tetris with a shake/tilt sensor

Posted: Wed Jun 06, 2018 10:21 am
by Ampersand
I got the code working the way I need, took about 2 hours knowing pretty much nothing!
Video:
https://www.youtube.com/watch?v=XkrI4-KCcu4

This was probably the hardest part of the whole build for me

Re: Tetripidation - Tetris with a shake/tilt sensor

Posted: Wed Jun 06, 2018 11:47 am
by wermy
Nicely done! Great to see people already jumping in and learning new stuff for this. :)

Re: Tetripidation - Tetris with a shake/tilt sensor

Posted: Fri Jun 08, 2018 6:45 pm
by Ampersand
I made a lot of progress today.
I'm now going to use the Adafruit Huzzah32 (thanks for the recommendation wermy) as it saves me having to add a lipo charger.

Swapped the rolling ball tilt sensor for a mercury one. I found that the ball bounced about and was far too sensitive, activating even when you pressed a button, the mercury is much 'stickier' and works perfectly (also looks way cooler).

Added a down button for Tetris, found it plays far too slowly without it.

I jumped back into Eagle and reminded myself how annoying it can be:
SpoilerShow
PCB draft.png
PCB draft.png (231.24 KiB) Viewed 14369 times
Need to polish it up a little and double check it, but it's pretty much done.

Also designed the case, I'm going to use clear laser cut acrylic like I did with my last handheld:
SpoilerShow
tetris layout.png
tetris layout.png (68.96 KiB) Viewed 14369 times
Exploded view:
tetris explode.png
tetris explode.png (64.99 KiB) Viewed 14369 times

Parts and prices:
  • Adafruit Huzzah32 $19.99
  • Mercury tilt sensor $0.48
  • 3x smd buttons $0.11
  • 0.96" OLED screen $2.20
  • PCB $5.00 (PCBway.com)
  • Battery $4.99 (could be cheaper)
  • Clear acrylic P1 3mm sheet $1.86 (cost of materials not the service, Razorlab.co.uk)
  • nuts+bolts $0.30
Total: $34.93

Re: Tetripidation - Tetris with a shake/tilt sensor

Posted: Sun Jun 10, 2018 4:55 am
by Strider
This is brilliant and I look forward to seeing the completed build!

Re: Tetripidation - Tetris with a shake/tilt sensor

Posted: Sun Jun 10, 2018 9:32 am
by Italian77
Yeah. Can’t wait to see it!

Re: Tetripidation - Tetris with a shake/tilt sensor

Posted: Tue Jun 12, 2018 7:02 am
by ArKade
You look like you're almost done! ;) Good job, I haven't even thought of my idea yet! Good luck!

Re: Tetripidation - Tetris with a shake/tilt sensor

Posted: Tue Jun 12, 2018 7:38 am
by Ampersand
ArKade wrote:
Tue Jun 12, 2018 7:02 am
You look like you're almost done! ;) Good job, I haven't even thought of my idea yet! Good luck!
I ordered the PCB and case today :P

Maybe there's something you usually do/use every day and a sensor can introduce a new/fun way of doing it?
I'd love to see a fart activated window opener :P

Re: Tetripidation - Tetris with a shake/tilt sensor

Posted: Tue Jun 12, 2018 12:18 pm
by ArKade
Haha :lol: No, I don't think I'll make something that cool. ;) I'm thinking about something to do with Mario or some other NES game.