Snakes And Ladders: Game Boy Emulator In Python

If a Game Boy was a part of your childhood, you were probably more than once dreaming of spending your entire school day with it. Well, they had to wait a few more years for that, but eventually in 2015, [Asger], [baekalfen], and [troelsy] made that dream reality when they created a Game Boy emulator in Python for a university project. However, it didn’t stop there, and the emulator has since grown into a full-blown open source project, PyBoy, which just reached the version 1.0 release.

Since it started out as an academic project, the three of them had to do their research accordingly, so the background and theory about the Game Boy’s internal functionality and the emulator they wrote is summarized in a report published along with the source code. There is still some work to be done, and sadly there is no sound support implemented yet, but for the most part it’s fully functional and let’s you successfully play your own extracted cartridges, or any ROM file you happen to have in your possession.

Being an emulator, you can also inspect its inner life when run in debug mode, and watch the sprites, tiles, and data as you play, plus do cool things like play the emulation in reverse as shown in the clip below. Even more so, you can just load the instance in your own Python scripts, and start writing your own bots for your games — something’s we’ve seen in action for the NES before. And if you want to dive really deep into the world of the Game Boy, you should definitely watch the 33c3 talk about it.

Continue reading “Snakes And Ladders: Game Boy Emulator In Python”

Custom Bluetooth Joystick In A Nunchuk Shell

With the Wii’s unique controller, Nintendo not only provided new gaming experiences to players, but gave hardware hackers a platform for experimentation that’s still going strong. Case in point, this modification of a third party Wii “Nunchuk” by [Giliam de Carpentier] that turns the accessory into a stand-alone wireless controller powered by a ATtiny44A.

Milling a new home for the AVR

It turns out there’s a considerable amount of free space inside the Nunchuk case, so [Giliam] found adding in the new hardware wasn’t nearly as difficult as you might expect. Of course, it helps that the diminutive SMD ATtiny44A and its support hardware are housed on a very neatly milled PCB that attaches to the back of the original board.

Most of the other hardware comes in the form of modular components, like the Bluetooth transmitter and TP4056 charge controller for the 300 mAh battery. A micro USB charging port is mounted where the original Nunchuk cable entered the case, making the whole thing look very professional.

Even if you aren’t interested in making your own controller, [Giliam] covers many interesting topics in this write-up such as handling different methods of Bluetooth connectivity and various power management techniques to eke out as much life from the relatively small battery as possible. It’s not only a fascinating read, but a great example of what thorough project documentation should look like.

In the past we’ve seen Bluetooth conversions for the Wii Nunchuck, but traditionally they left the original electronics in place. On the other side of the spectrum, we’ve also seen the internals get replaced with something as powerful as the Raspberry Pi Zero.

Continue reading “Custom Bluetooth Joystick In A Nunchuk Shell”

Cable Driven Robotic Joint

Even the oldest of mechanisms remain useful in modern technology. [Skyentific] has been messing with robotic joints for quite a while, and demonstrated an interesting way to use a pulley system in a robotic joint with quite a bit of mechanical advantage and zero backlash.

Inspired by the LIMS2-AMBIDEX robotic arm, the mechanism is effectively two counteracting sets of pulley, running of the same cable reel, with rollers allowing them to act around the bend of the joint. Increasing the mechanical advantage of the joint is simply a matter of adding pulleys and rollers. If this is difficult to envision, don’t work as [Skyentific] does an excellent job of explaining how the mechanism works using CAD models in the video below.

The mechanism is back drivable, which would allow it to be used for dynamic control using a motor with an encoder for position feedback. This could be a useful feature in walking robots that need to respond to dynamically changing terrain to stay upright, or in arms that need to push or pull without damaging anything. With properly tensioned cables, there is no backlash in the mechanism. Unfortunately cables can stretch over time, so it is something that needs to be considered when using this in a project.

Pulley systems have been with us for a very long time, and remain a very handy tool to have in your mechanical toolbox. A similar arrangement is used in the Da Vinci surgical robots to control their tiny manipulators. It would also be interesting to see this used in the already impressive robots of [James Bruton]. Continue reading “Cable Driven Robotic Joint”

Human-Powered Laser Gun Makes Battery-Free Target Practice

[Dirk] shared a fascinating project of his that consists of several different parts coming together in a satisfying whole. It’s all about wanting to do target practice, indoors, using a simple red laser dot instead of any sort of projectile. While it’s possible to practice by flashing a red laser pointer and watching where it lands on a paper target, it’s much more rewarding (and objective) to record the hits in some way. This is what led [Dirk] to create human-powered, battery-free laser guns with software to track and display hits. In the image above, red laser hits on the target are detected and displayed on the screen by the shooter.

Right under the thumb is the pivot point for the lever, and that’s also where a geared stepper motor (used as a generator) is housed. Operating the action cranks the motor.

There are several parts to this project and, sadly, the details are a bit incomplete and somewhat scattered around, so we’ll go through the elements one at a time. The first is the guns themselves, and the star of the show is his 3D printed cowboy rifle design. The rifle paints the target with a momentary red laser dot when the trigger is pressed, but that’s not all. [Dirk] appears to have embedded a stepper motor into the lever action, so that working the lever cranks the motor as a generator and stores the small amount of power in a capacitor. Upon pulling the trigger, the capacitor is dumped into the laser (and into a piezo buzzer for a bit of an audio cue, apparently) with just enough juice to create a momentary flash. We wish [Dirk] had provided more details about this part of his build. There are a few more images here, but if you’d like to replicate [Dirk]’s work it looks like you’ll be on your own to some extent.

As for the target end of things, blipping a red dot onto a paper target and using one’s own eyeballs can do the job in a bare minimum sort of way, but [Dirk] went one further. He used Python and OpenCV with a camera to watch for the red dot, capture it, then push an image of the target (with a mark where the impact was detected) to a Chromecast-enabled screen near the shooter. This offers much better feedback and allows for easier scoring. The GitHub repository for the shot detector and target caster is here, and while it could be used on its own to detect any old laser pointer, it really sings when combined with the 3D printed cowboy rifle that doesn’t need batteries.

Not using projectiles in target practice does have some benefits: it’s silent, it’s easy to do safely, there is no need for a backstop, there are no consumables or cleaning, and there is no need to change or patch targets once they get too many holes. Watch it all in action in the video embedded below.

Continue reading “Human-Powered Laser Gun Makes Battery-Free Target Practice”

Fuel From Water Using Only An Arc Welder

Water, high currents, blinding balls of plasma, and a highly flammable gas that’s toxic enough to kill you in three minutes if you breathe enough of it. What’s not to love about this plasma-powered water gas generator?

In all seriousness, [NightHawkInLight] is playing with some dangerous stuff here, and he’s quite adamant about this one being firmly in the “Don’t try this at home” category. But it’s also fascinating stuff, since it uses nothing but a tank of water and an electric arc to produce useful amounts of fuel very quickly. It’s easy to jump to the conclusion that he’s talking about the electrolytic splitting of water into the hydrogen-oxygen mix HHO, but this is something else entirely.

Using a carbon electrode torch connected to his arc welder, a setup that’s similar to the one he used to make synthetic rubies, [NightHawkInLight] is able to strike an underwater arc inside a vessel that looks for all the world like a double-barreled bong. The plasma creates a mixture of carbon monoxide and hydrogen which accumulates very rapidly in the gasometer he built to collect the flammable products produced by a wood gasifier.

The water gas burns remarkably cleanly, but probably has limited practical uses. Unless you live somewhere where electricity costs practically nothing, it’ll be hard to break even on this. Still, it’s an interesting look at what’s possible when plasma and water mix.

Continue reading “Fuel From Water Using Only An Arc Welder”

A LoRa IM-Me For The End Of The World

Enshrined in the hacker hall of fame, the IM-Me was an instant messaging toy that turned out to be extremely hackable. You could easily ditch its instant messaging platform to turn it into a little spectrum analyser. Of course what’s old is new again, and in this age where we no longer have the Nokia 3110, the Sidekick, or even Blackberries, how shall we get our fix of those wireless gadgets with physical keyboards?

What would happen if a hacker had a go at creating one of those? [Bobricius]’ Armachat is an instant messaging platform that uses LoRa as its over-the-air protocol, and is powered by a Microchip ATSAMD21x18 ARM Cortex M0 microcontroller alongside an RFM95 LoRa module.

The IM-Me, a free text chat device in the age of per-message charges, was the sweat heart of hardware hacking back in 2010

There are two versions of the device for hand and pocket, both of which come with QWERTY keyboards made with momentary-action switches, 18650 cell power, and LCD screens. The idea is that it could form a robust communication system when many others have failed.

As it stands they have a simple text messaging app in the firmware, but there are other features yet to come. Perhaps the most interesting is a possible store-and-forward meshing system in the future, which would make this a powerful comms tool in so many circumstances. Both of [Bobricius’] devices can be seen in the video below the break — no word from him on the possibility of a pink case option. Meanwhile [Bobricius] has appeared on these pages many times before. With so many to choose from it’s hard to pick one, but his Nixie-like LED display is quite memorable.

Continue reading “A LoRa IM-Me For The End Of The World”

Tired Of Fruit Ninja? Try Vegetable Assassin Using An ESP32 Sword

In a world where ninjas no longer rule the social hierarchy, where can a ninja-wannabe practice their sword fighting skills? In the popular Introduction to Embedded Systems class at the Massachusetts Institute of Technology, a team of students made their own version of the popular mobile game Fruit Ninja with a twist – you’re fighting your true nemesis, vegetables.

Vegetable Assassin allows single or multi-player mode, with players slicing vegetables on a screen using fake swords with sensors to detect the players’ motion. The web-based game allows swords to communicate their orientation to the game session with a WebSocket connection to a server, with the game generated and rendered using a 3D client JavaScript library. Rather than using MQTT, which also uses a persistent TCP connection as well as lower overhead, WebSocket provided maximum browser support.

An onboard ESP32 microcontroller and IMU track the sword movements. The game begins by calibrating the sword movements within the play area. Information is generated using the Madgwick algorithm, a 9-degrees-of-freedom algorithm that uses 3-axis data from the sword’s gyroscope, accelerometer, and magnetometer and outputs the absolute orientation of the sword.

The sword and browser both connect to the same channel on the server through a WebSocket connection, identified by a session ID similar to how web chat rooms are implemented. A statistics server manages the allocation of session IDs and other persistent game data to track high scores.

As for the graphics, a Three.js WebGL library creates the scene and camera, loading the game into the browser’s animation frame. Other scripts load the 3D models for the fruits and vegetables in the game, update their positions based on the physics engine provided by Cannon.js, and render UI elements within the game.

Curious? The project site has the microcontroller code to build your own sword that you can use to play the demo. If you don’t have an ESP32 and accelerometer handy you can play Vegetable Assassin in your browser instead.