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”

Simple MP3 Player Hides Home Automation Brilliance

Like bubble wrap or the corkscrew, plenty of everyday objects have lost almost all ties to their original purpose. It could be that the original product had no market but was able to find one in an unexpected place, or simply that the original use case disappeared. We think that this MP3 player for children might arrive at a similar fate as a home automation controller thanks to a recent project by [Sebastian].

The MP3 player is known as a Jooki and works by using small figurines (and a few buttons) to control the device. Different figurines cause the MP3 player to change playlists, for example, but it turns out that the device is capable of communicating over MQTT. This means that [Sebastian] was able to use the MQTT messages from the Jooki to do all kinds of things beyond its intended use with openHAB, an open-source home automation system, such as dimming the lights and closing the blinds when he puts his son to bed.

This platform has considerable potential for hacking thanks to the lightweight communications system it uses under the hood. The Jooki is a little pricey, but if you happen to have one around, it’s an impressive tool that can go well beyond its original intended use.

Something’s Brewing Up In The Woods – And It Looks Stunning

Caffeine fuels the hacker, and there are plenty of options to get it into your system, from guzzling energy drinks to chewing instant coffee pellets. But let’s take a nice cup of coffee as input source, which itself can be prepared in many ways using all kinds of techniques. In its simplest form, you won’t need any fancy equipment or even electricity, just heat up some water over a fire and add your ground beans to it. This comes in handy if you’re camping out in the woods or find yourself in a post-apocalyptic world, and in case you still prefer a stylish coffee maker in such a situation — why let an apocalypse ruin having nice things? — you’re in luck, because [Andreas Herz] designed this nifty looking off-the-grid coffee maker.

The design somewhat resembles a certain high-end precision coffee maker that even fictional billionaires approve of, which [Andreas] created in Fusion 360 and is available online. The device base is made from brass, wood, and silicone he cast from a 3D printed mold, while the glass and ceramic parts — i.e. the water tank and coffee pot — are simply store bought. [Andreas] opted for fuel gel as heat source, which burns under a copper coil that acts as heat exchanger and starts the actual brewing process. It took him a few attempts to get it right, and in the end, a coat of black exhaust paint did the trick to get the temperatures high enough.

This may not be the fastest coffee maker, as you will see in the video after the break, but choosing a different fuel source might fix that — [Andreas] just went the safe(r) way by using fuel gel here. But hey, why rush things when you’re camping or having a cozy time in a cabin anyway. Now all you need is the right blend, maybe even your own, made with a camp stove coffee roaster. Of course, in case of an actual apocalypse, you may not have easy access to a CNC router or 3D printer, but then there’s always the option to build an espresso machine from salvaged motorcycle parts.

Continue reading “Something’s Brewing Up In The Woods – And It Looks Stunning”

Vizy The AI Camera Aims To Ease Machine Vision

Cameras are getting smarter and more capable than ever, able to run embedded machine vision algorithms and pull off tricks far beyond what something like a serial camera and microcontroller board would be capable of, and the upcoming Vizy aims to be even smarter and easier to use yet. Vizy is the work of Charmed Labs, and this isn’t their first foray into accessible machine vision. Charmed Labs are the same folks behind the Pixy and Pixy 2 cameras. Vizy’s main goal is to make object detection and classification easy, with thoughtful hardware features and a browser-based interface.