This Snake Has Legs

[Allen Pan] loves snakes. He loves them so much that he’s decided to play god, throwing away millions of years of evolution — just to give snakes back the legs they’ve “lost”.

Ok, so this hack has tongue planted firmly in cheek, but it’s still pretty darn cool. [Allen] designed and 3D printed what can best be described as a robot for snakes to ride.

The build wasn’t easy. Allen’s first attempts using toys based on [Jamie Mantzel]’s giant robot didn’t go exactly to plan. Thankfully those were only tested with a plush snake test dummy.  Thankfully [Allen’s] second was on target.

The robot itself consists of 4 legs, each with 3 joints and two servos. The foot joint pivots freely to handle any uneven terrain. The robot’s gait is derived from lizards Allen observed in a pet shop. The main body of the robot is a clear plastic tube. Once Shinji the snake decides to get in the robot, it isn’t strapped in. In fact, the snake is free to leave whenever it wants.

Currently, the whole system just walks forward. [Allen] appears to be using a servo controller with a hard-coded walking sequence. We’d love to see the next step – figuring out a way for the snake to control the robot’s direction.  Perhaps with a camera with gaze detection?

We’ve covered robots driven by animals before, and we’ve covered some of [Allen]’s builds — like this electromagnetic rendition on Mjölnir.
Continue reading “This Snake Has Legs”

ATtiny85 Snake Game Is A Circuit Sandwich

If there’s any looming, unwritten rule of learning a programming language, it states that one must break in the syntax by printing Hello, World! in some form or another. If any such rule exists for game programming on a new microcontroller, then it is certainly that thou shalt implement Snake.

This is [__cultsauce__]’s first foray away from Arduinoville, and although they did use one to program the ATtiny85, they learned a lot along the way.

It doesn’t take much to conjure Snake with an ’85 — mostly you need a screen to play it on (an OLED in this case), some buttons to direct the snake toward the food dot, a handful of passives, and a power source.

[__cultsauce__] started by programming the microcontroller and then tested everything on a breadboard, both of which are admirable actions. Then it was time to make this plywood and cork sandwich, which gives the point-to-point solder joints some breathing room and keeps them from getting crushed. Be sure to check it out in action after the break, and grab the files from GitHub if you want to charm your own ‘tiny Snake.

There’s a ton you can do with this miniature microcontroller, and that includes machine learning.

Continue reading “ATtiny85 Snake Game Is A Circuit Sandwich”

Play Your Favorite Nokia Game On The Raspberry Pi Pico

In many people’s memories, Snake lived and breathed on Nokia handsets from the late 90s and early 2000s. However, the game has been around for much longer than that, and will continue to live on in the future. That’s at least in part thanks to people like [Hari Wiguna] keeping it alive by implementing it on new platforms.

[Hari] set about writing Snake in MicroPython for the Raspberry Pi Pico. The hardware side of things is simple enough – five buttons hooked up to the Pico, along with an 128×64 I2C OLED screen to display the game on. On the software side of things, [Hari] pushed the boat out, deciding that his version of Snake had to have the player character slither like the real thing. This took a little effort to get right, particularly when navigating corners in different directions. However, perseverance paid off and [Hari] got the job done.

Code is on GitHub for those that want to tinker at home. It’s a tidy piece of work, though not the weirdest place we’ve seen the game appear – we’ve actually seen it run within PCB routing software before thanks to some nifty scripting. Video after the break. Continue reading “Play Your Favorite Nokia Game On The Raspberry Pi Pico”

Playing Snake On A PCB!

When conversation turns to the older Nokia mobile phones, it’s unlikely to be the long battery life or ability to conjure a signal out of thin air that tickles people’s memory, instead it’s the Snake game built into the stock firmware. Snake was an addictive yet extremely simple game in which a line of pixels — the snake in question — was navigated around the screen to eat the fruit without crashing into walls or itself. As the game progressed the snake grew in length, making it a surprisingly difficult challenge. If you hanker for Snake, as [VK5HSE ] writes, you can now play it in a PCB layout.

The software in question is PCB-RND, a cross-platform open-source PCB CAD tool, and the game is achieved through the magic of user scripting. Simply download the script, run it in your favourite circuit board, and away you go!

We can’t imagine a productive use for this piece of software, but it wouldn’t surprise us to see a snake slithering into a few boards we feature. It does provide a handy reminder though of the power in your PCB CAD tool’s scripting features, something it’s likely not many of us use to their full potential.

We’ve featured [VK5HSE]’s work with PCB-RND before, in a very useful Eagle import tool.

Fitting Snake Into A QR Code

QR codes are usually associated with ASCII text like URLs or serial numbers, but did you know you can also encode binary data into them? To demonstrate this concept, [MattKC] embarked on a journey to create a QR code that holds an executable version of Snake. Video after the break.

As you might expect, the version 40 QR code he ended up using is much larger than the ones you normally see. Consisting of a 171 by 171 grid, it’s the largest version that can still be read by most software. This gave [MattKC] a whopping 2,953 bytes to work with. Not a lot of space, but still bigger than some classic video games of the past.

To start, he first wrote Snake to run in a web browser using HTML, CSS, and JavaScript, which was able to fit in the available space. Modern browsers do a lot of the lifting with built-in features, and [MattKC] wanted more of a challenge, so he decided to instead create a Windows executable file. His first attempts with compiled C code were too large, which led down the rabbit trail of x86 Assembly. Here he found that his knowledge of Assembly was too limited to create a small enough program without investing months into the project. He went back to C and managed to compress his executable using Crinkler, a compressing linker commonly used in the demoscene. This shrunk the file down to 1,478 bytes.

Zbar, a command-line barcode reader for Windows was used to test the final Snake QR code. [MattKC] discovered a bug in Zbarcam that prevented it from reading binary data via a webcam input, so through the power of open source, he submitted a bug fix which is now integrated into the official release.

All the files are available for anyone to play with on [MattKC]’s website. The video below goes into a lot of detail on the entire journey. Since this project proves software can be embedded in QR codes, it means that malware could also be hidden in a QR code, if there is an exploitable bug somewhere in a smartphone QR reader app.

QR codes are an interesting tool with a variety of uses. Take a deep dive into how they work, generate a 3D printable version, or build a QR jukebox, if you want to learn more.

Continue reading “Fitting Snake Into A QR Code”

Tiny ThinkPad Plays Tiny Games

[Paul Klinger] can’t seem to get enough of building tiny, amazing gaming rigs, and we love him for that. They combine two of our favorites: miniatures and portable gaming. His newest creation honors the form of the formidable ThinkPad.

Of course it has the red nipple and lid LED—wouldn’t be a ThinkPad without ’em. ThinkTiny’s nipple is a 5-way joystick that plays Snake, Tetris, Lunar Lander, and more on an OLED screen. Like its predecessor the Tiny PC, [Paul] used an ATtiny1614, which (FYI) has a new one-wire UDPI interface. He can easily reprogram it through pogo pin holes built into the case.

There are some nice stylistic details at play here, too. The lid LED is both delivered and diffused by a 2mm grain of fiber-optic cable. And [Paul] printed the cover with a color change to transparent filament to make the Think logo and the charging LEDs shine through. Maneuver your way past the break to see it in action.

If you haven’t leveled up to AVR programming yet, introduce yourself to Arduboy.

Continue reading “Tiny ThinkPad Plays Tiny Games”

Ultra Tiny PC Plays Snake

[Steve Martin] used to do a comedy act about “Let’s get small!” You have to wonder if [Paul Klinger] is a fan of that routine, as he recently completed a very small 3D printed PC that plays snake. Ok, it isn’t really a PC and it isn’t terribly practical, but it is really well executed and would make a great desk conversation piece. You can see the thing in all its diminutive glory in the video below.

The 3D printer turned out a tiny PC case, a monitor, and a joystick. The PC contains an ATtiny1614, an RGB LED, and some fiber optic to look like case lighting. The monitor is really a little OLED screen. A 5-way switch turns into the joystick.

Continue reading “Ultra Tiny PC Plays Snake”