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”

This Robot Swims, Skates, And Crawls

You often hear that art imitates life, but sometimes technology does too. Pliant Energy Systems’ Velox robot resembles an underwater creature more than it does a robot because it uses undulating fins to propel itself, as you can see in the video below.

The video shows the beast skating, but also swimming, and walking. It really does look more like a lifeform than a device. According to the company, the robot has excellent static thrust/watt and is resistant to becoming entangled in plants and other debris.

Continue reading “This Robot Swims, Skates, And Crawls”

Making Robot Snakes That Slither, Sidewind, And Strike

[Will Donaldson] has been making robot snakes of all sorts. One of his snakes hugs the ground, slithering across it with a sine wave motion. Flipping it on its side and calling different code, that same snake also moves like an inchworm. Another of his snakes lifts parts of itself upward to move sideways across the ground, again using sine waves.

3D printed scales
3D printed scales

At first, his slithering snake would only oscillate in place on the floor. Looking more closely at biological snakes, he found that part of the reason they moved forward was due to their scales. The scales move smoothly over the ground in one direction but grip when pushed backward or sideways. He also found work done at Harvard University where they combined pumped air and papercraft to make scales which change shape. And so [Will] designed and 3D printed some scales for his snake. However, as you can see in the video below, they didn’t work on carpet.

His success came when he added wheels to each segment. They didn’t work like a car, there was no engine turning the wheels. Instead, they acted more like scales, rotating freely in one direction and gripping when pushed sideways. This success also allowed him to add a parameter to his code for turning left or right.

As we said above, he can flip the ground hugger sideways and run it as an inchworm and he also has a working sidewinder snake variation. The sidewinder can even lift up its head and strike like a cobra. Check out his page if you want to make your own. He’s provided STL files, code, and construction details.

[Will] has a lot of future plans for his snakes. Currently, they’re tethered to a modified ATX power supply but he’d like to incorporate LiPo batteries into the snakes instead. His original goal was to make a tree climbing snake like the one by the Biorobotics lab at Carnegie Mellon University (updated link for the article) but his first snake wasn’t long enough. He still plans on pursuing that as well as an underwater electronic eel. There seems to be no limit to the things he can try. For now, check out the video below to see his successes and his failures so far. Maybe you even have some suggestions for those tricky scales. The undersides of his snake’s segments do seem modular, lending themselves to experimentation.

Continue reading “Making Robot Snakes That Slither, Sidewind, And Strike”

Autodesk Introduces Serpentine Router For Eagle

Since Autodesk acquired Eagle a few years ago, they’ve been throwing out all the stops. There is now a button in Eagle that flips your board from the front to the back — a feature that should have been there twenty years ago. There’s parametric part generation, push and shove routing, integration with Fusion 360, and a host of other features that makes Eagle one of the best PCB layout tools available.

Today, Autodesk is introducing something revolutionary. The latest version of Eagle (version 8.7.1) comes with a manual serpentine routing mode, giving anyone the same tools as the geniuses at Nokia twenty years ago.

An exclusive first look at Eagle’s new serpentine routing mode

The new serpentine routing mode is invoked via the SNAKE command. This brings up serpentine routing interface, where you can add nets and place your serpentine router. Click anywhere on the screen, and you can route around pads and traces to collect all the vias, hopefully netting a high score.

There are some tricks to this new mode. Control and Shift change the speed of serpentine routing, and the current zoom level changes the initial speed. As you route between vias, the serpentine router grows longer, making routing significantly more difficult, but if you’re up to the task you’ll eventually get a ‘You’re Winner’ screen.

This is just the innovation we’ve been looking for from Autodesk since their acquisition of Eagle. It’s not push and shove routing, and it’s not parametric part generation. Serpentine routing is the next big thing in EDA tools, and already this routing mode is on the upcoming feature list for KiCad. The KiCad version of serpentine routing will be pronounced, ‘sneak’.