Tetripidation - Tetris with a shake/tilt sensor

Post your in-progress project logs for the summer 2018 competition here!
User avatar
Ampersand
Posts: 100
Joined: Fri Aug 04, 2017 3:52 am
Has thanked: 24 times
Been thanked: 126 times

Tetripidation - Tetris with a shake/tilt sensor

Post by Ampersand » Tue Jun 05, 2018 1:02 pm

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 13878 times

User avatar
wermy
Site Admin
Posts: 1346
Joined: Tue May 03, 2016 8:51 pm
Has thanked: 620 times
Been thanked: 1322 times
Contact:

Re: Tetripidation - Tetris with a shake/tilt sensor

Post by wermy » Tue Jun 05, 2018 1:40 pm

Awesome! :D In my opinion anything open-source is fair game to draw from.
ImageImageImageImage

User avatar
Ampersand
Posts: 100
Joined: Fri Aug 04, 2017 3:52 am
Has thanked: 24 times
Been thanked: 126 times

Re: Tetripidation - Tetris with a shake/tilt sensor

Post by Ampersand » Wed Jun 06, 2018 10:21 am

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

User avatar
wermy
Site Admin
Posts: 1346
Joined: Tue May 03, 2016 8:51 pm
Has thanked: 620 times
Been thanked: 1322 times
Contact:

Re: Tetripidation - Tetris with a shake/tilt sensor

Post by wermy » Wed Jun 06, 2018 11:47 am

Nicely done! Great to see people already jumping in and learning new stuff for this. :)
ImageImageImageImage

User avatar
Ampersand
Posts: 100
Joined: Fri Aug 04, 2017 3:52 am
Has thanked: 24 times
Been thanked: 126 times

Re: Tetripidation - Tetris with a shake/tilt sensor

Post by Ampersand » Fri Jun 08, 2018 6:45 pm

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 13747 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 13747 times
Exploded view:
tetris explode.png
tetris explode.png (64.99 KiB) Viewed 13747 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
Last edited by Ampersand on Thu Aug 30, 2018 5:38 pm, edited 1 time in total.

User avatar
Strider
Posts: 29
Joined: Fri Feb 16, 2018 9:03 pm
Location: Elsewhere
Has thanked: 20 times
Been thanked: 4 times

Re: Tetripidation - Tetris with a shake/tilt sensor

Post by Strider » Sun Jun 10, 2018 4:55 am

This is brilliant and I look forward to seeing the completed build!

User avatar
Italian77
Posts: 145
Joined: Thu Feb 22, 2018 8:54 pm
Has thanked: 50 times
Been thanked: 41 times

Re: Tetripidation - Tetris with a shake/tilt sensor

Post by Italian77 » Sun Jun 10, 2018 9:32 am

Yeah. Can’t wait to see it!
My first Circuit Sword build - Custom Painted
https://sudomod.com/forum/viewtopic.php?f=43&t=5855

User avatar
ArKade
Posts: 19
Joined: Wed Feb 21, 2018 5:36 pm
Has thanked: 17 times
Been thanked: 3 times

Re: Tetripidation - Tetris with a shake/tilt sensor

Post by ArKade » 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!

User avatar
Ampersand
Posts: 100
Joined: Fri Aug 04, 2017 3:52 am
Has thanked: 24 times
Been thanked: 126 times

Re: Tetripidation - Tetris with a shake/tilt sensor

Post by Ampersand » Tue Jun 12, 2018 7:38 am

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

User avatar
ArKade
Posts: 19
Joined: Wed Feb 21, 2018 5:36 pm
Has thanked: 17 times
Been thanked: 3 times

Re: Tetripidation - Tetris with a shake/tilt sensor

Post by ArKade » Tue Jun 12, 2018 12:18 pm

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest