It’s great to see people are out there trying to find fun ways to exercise amid the current crisis. Although jumping up and down isn’t great for the knees, it does give decent cardio. But if you don’t have a rope or a puddle, we admit that jumping can lose its bounce pretty fast.
Quarantine has been a game-filled time for [fridaay]. Somewhere between a handful of FPS games, he decided to try to play Google’s offline dinosaur-based side scroller game by making the dinosaur spring over the saguaros whenever he physically jumps in the air. (Video, embedded below.)
Here’s how it works: [fridaay] holds a transmit circuit that consists of an Arduino UNO, an accelerometer module, and an nRF24L01 transceiver, all running on a 9 V battery. Whenever [fridaay] jumps, the accelerometer reads the change in Z and sends it to the receiving circuit, which is just another UNO and nRF. The receiving UNO is connected to a laptop and configured to press the space bar so the dinosaur canters over the cacti.
We’ve never been able to stay alive long enough in the game to see this happen, but apparently you need to crouch at some point in the game. [fridaay] has yet to implement a control for that, but we’re sure he’ll think of something. Jump past the break to see the video, and hit him up if you need the code.
If you have a lot of parts at your disposal, why not make a physical version?
Via r/duino
If the dinosaur gets too boring, give geometry dash a bash, it’s nothing to do with geometry really, graphic theme is sort of based on it, but jumping is sort of synched to the music, which is EDM-y chiptune-y which makes it addictive, I guess like playing one note on rock band too. Anyway should be able to rig this project to work with that too, or flappy bird if you’re a real masochist LOL
No need to use photoresistor. This could have been solved with bunch of raspberry pis, high FPS camera and deep learning AI running on quantum computer in the offshore cloud.
Seems like a lot of physical work. There’s other (generally successful) methods of doing this as well that require less physical movement. If that’s your preference of course.
https://www.geeksforgeeks.org/google-chrome-dino-bot-using-image-recognition-python/
https://www.reddit.com/r/arduino/comments/c5o4kf/i_made_an_automated_dinosaur_game_bot/
I think the whole point here is to do physical work (exercise)
:-)
Oh this is totally unrealistic, tyrannosaurs and cacti weren’t even contemporaneous!
Yeaaah!
I can’t find it now, but there’s a recent YT video of someone hooking a treadmill to a game where you walk on the treadmill to make the game character walk. For something as quickly hacked together as it was—IIRC, the treadmill was hooked to the PC via a USB game controller with some glue logic—it seemed to work quite well and provide quite a workout.
Pretty sure your thinking of Allen Pans Death Stranding video lol.
Sounds about right. Couldn’t remember the game’s title, but it was pretty much a delivery guy walking through various landscapes.
Wake me up, when there’s live action Snake or Boulder dash. No, good job.
Just on time to learn some new skills, Brian Lough explained how to emulate a bluetooth keyboard with an ESP32: https://hackaday.com/2020/02/13/emulating-a-bluetooth-keyboard-with-the-esp32/
… Now if the Google Dino is too easy, what about a nice game of QWOP? http://www.foddy.net/Athletics.html
Stay safe everyone (aka don’t injure yourself during the lockdown)
Nice hack, you should check at the Arduino Nano 33 BLE Sense; it has bluetooth runs on 64 MHz and an integrated accelerometer chip. I use it for a rotor balancer see https://github.com/hstarmans/rotorbalancer .. it was also part of the goodie bag at the hackaday prize.
How about just streaming phone accelerometer data to the computer and injecting keystrokes on the computer?
Or of course the old Wii controller strapped to your leg deally.
I’ve been experimenting with a phone accelerometer streaming data to the laptop. It’s trickier than I thought. There are two acceleration spikes in every jump: when you push up and when you land. Looking at acceleration graphs, the landing spike is sometimes very similar to the take-off spike.
One needs to filter out the second spike, while still allowing for multiple jumps in quick succession. I’ve had good luck with a fairly crude algorithm that counts 2g acceleration (including gravity) as a jump, but then it requires either a short period of ~1g acceleration or a 0.8sec delay (which empirically is enough to cover the landing spike) to reset before the next jump.
A constraint on the algorithm is that we want to trigger the in-game jump at the earliest possible point in the jump, as otherwise the game becomes really unplayable. So we can’t just analyze the shape of the acceleration curve in hindsight, as we could if we were doing fitness tracking.
My current (and far from final) jump-detection algorithm is here: https://github.com/arpruss/jumpdetect . It requires an app running on the phone to stream acceleration data over bluetooth, but that app is in such sorry state that I don’t want to post it yet.
Technically speaking the solution is very cool! Congratulations to the author and article with many useful information.
But I can’t help thinking on one NC switch with an upcycled ps/2 keyboard controller board!