Making a T-Rex game auto jumper with CircuitPython – The MagPi Issue 148 @TheMagPi

The MagPi Magazine (+ HackSpace) Issue 148 features automating playing the Google T-Rex jumping game with a Pi Pico and CircuitPython:

For those who have used Google Chrome, you may have seen the screen that pops up when your internet connection fails. It’s of a pixelated T-Rex, and if you press the spacebar, you can kill time before your internet connection is restored by playing a little cactus-jumping game. If your internet goes down for a really long time, then maybe you can automate playing it.

Maker Bas op ten Berg presented us his project, the full name of which is ‘Automatic Jumping in the T-Rex Game: Detecting Cacti with a Raspberry Pi Pico CircuitPython HID Controller’, that does just that.

“Using a Raspberry Pi Pico, a light dependent resistor (LDR), a breadboard, some DuPont cables, and tape, I automated the famous Google T-Rex game,” Bas explains. “The LDR detects differences in analogue measurements whenever it senses cacti, which are always dark coloured and appear on the same plane. The analogue-digital converter [ADC] port of the Pico measures each passing cactus ten times per second. After a 0.2-second delay, the Human Interface Device [HID] library simulates pressing the ‘up’ button on the keyboard, making the T-Rex jump at the right time.”

The MagPi Issue 148, pages 30-31, Read MoreDownload PDFbuy nowsubscribe


Have an amazing project to share? The Electronics Show and Tell is every Wednesday at 7:30pm ET! To join, head over to YouTube and check out the show’s live chat and our Discord!

Join us every Wednesday night at 8pm ET for Ask an Engineer!

Join over 38,000+ makers on Adafruit’s Discord channels and be part of the community! http://adafru.it/discord

CircuitPython – The easiest way to program microcontrollers – CircuitPython.org


New Products – Adafruit Industries – Makers, hackers, artists, designers and engineers! — New Products 11/15/2024 Featuring Adafruit bq25185 USB / DC / Solar Charger with 3.3V Buck Board! (Video)

Python for Microcontrollers – Adafruit Daily — Python on Microcontrollers Newsletter: A New Arduino MicroPython Package Manager, How-Tos and Much More! #CircuitPython #Python #micropython @ThePSF @Raspberry_Pi

EYE on NPI – Adafruit Daily — EYE on NPI Maxim’s Himalaya uSLIC Step-Down Power Module #EyeOnNPI @maximintegrated @digikey

Adafruit IoT Monthly — The 2024 Recap Issue!

Maker Business – Adafruit Daily — Apple to build another chip at TSMC Arizona

Electronics – Adafruit Daily — SMT Tip – Stop moving around!

Get the only spam-free daily newsletter about wearables, running a "maker business", electronic tips and more! Subscribe at AdafruitDaily.com !


No Comments

No comments yet.

Sorry, the comment form is closed at this time.