We thought the construction was really neat; suspending a wooden ball in the middle of three retractable key rings. By moving the ball around you can control the motion of a cube displayed on the computer. We first thought this was done by encoders or potentiometers measuring the amount of string coming out of the key fobs. However, what’s actually happening is a little bit cleverer.
[Nicolas] has joined each string with its own 2 axis joystick from Adafruit. He had some issues with these at first because the potentiometers in the joysticks weren’t linear, but he replaced them with a different module and got the expected output. He takes the angle values from each string, and a Python program numerically translates the output from the mouse into something the computer likes. The code is available on his GitHub. A video of the completed mouse is after the break.
[Matt] created an animated gif of New Horizon’s Pluto flyby. The source images were taken from the the raw LORRI images, modified so the background star field could be seen, and assembled with OpenCV. Because Pluto and Charon orbit each other around a point above Pluto’s surface, simply putting Pluto in the center of each frame wouldn’t work. It’s the best visual explanation of this weird arrangement yet, all brought to you by the magic of OpenCV and Python.
On the subject of Kickstarter creators that don’t understand the conservation of energy, I present this.
[Frank]’s 2011 Hundai Santa Fe wasn’t cool enough, so he added an F16 flight stick to his shift knob. The choice of joystick is paramount here: Saitek joysticks look too techy, Logitech ones are too expensive, and the Warthog H.O.T.A.S costs $400. Joysticks are extremely niche peripherals these days, it seems. He ended up strapping an old F16 joystick from the 90s on his shift knob, and it looks close enough to the real thing.
Two bodgers are stuffing the engine from a Toyota Celica into a 1980 Mini, and they’re trying to make it look stock. We’ve seen their project before, and now there’s a new episode. In this episode: the pedal box, the steering wheel, and figuring out how to make the car drive straight.
[Leon] plays Euro Truck Simulator 2, and like any good simulator, there are people out there building consoles, cockpits, and dashboards. In [Leon]’s case, he wanted a dashboard for his virtual trucks and cobbled one together out of a dash taken from a VW Polo.
This project was inspired by [Silas Parker] and his Arduino-based dashboard made out of a cardboard box, some servos, and a few LEDs. It worked, but [Leon] realized just about every dashboard made in the last decade or so has a CAN bus. You can just buy a CAN bus shield for an Arduino, and a dashboard can be easily found at any junkyard.
Right now, [Leon] is in the process of finding the CAN bus addresses of the relavent dials and LEDs on the dashboard. He found the tachometer at 0x280, and a bunch of indicator lights can be found at 0x470. Combined with a standard computer steering wheel and the telemetry SDK for Euro Truck Simulator 2, [Leon] has the beginnings of a virtual big rig on his desk.
[Quinn Dunki] has been hard at work building a Teddy Top – an Apple IIc Plus modified for a road warrior. It has a 3.5 inch disk drive, runs at a blistering four megahertz, and has a beautiful integrated color LCD. It would be a shame to have such a great machine and no way to play games as they were intended, so [Quinn] set about building a game pad for her lovable Apple II.
The Apple II joystick port isn’t as simple as an Atari or Commodore joystick port. Where the bog-standard Atari joystick is basically just a bunch of switches connected to pins, the Apple II joystick is analog. Weird, and even weirder is the value of the pots in these joysticks: 150kΩ. Somehow or another, nobody makes pots in this value any more. Luckily the hardware in these joysticks is well documented, and shoehorning in modern components isn’t that bad.
The Apple joystick has a bit of circuitry – a 556 timer chip that reads the values of each pot and converts that into a stream of 0s and 1s for the Apple. The joystick [Quinn] found for her game pad is an analog thumb stick on a neat breakout board manufactured by Parallax. This analog joystick has 10kΩ pots in it, and that just won’t work with the 556 timer chip. However, since this is just resistors and a 556 chip, adjusting some of the values on the original schematics does the trick. [Quinn] added a few capacitors to her circuit, and everything worked beautifully.
With the electronics down, she turned her attention to the case for her Apple II road warrior enclosure. She recently picked up a 3D printer, which means she’s new to 3D printing. After spending a few hours designing a controller in 123D Design, she sent the files over to the printer. Warping happened. She tried an ABS slurry. The part was stuck to the bed. It took a few tries (purple glue sticks are awesome, [Quinn]), but she eventually got her plastic enclosure printed out, and the circuitry installed. The result is a portable computer, with a custom controller, playing Lode Runner. Can’t beat that.
I usually see retro-gaming projects using tiny screens with a fair number of pixels (64×64) but what I really like is the look of making every pixel count. With this in mind I built 1-Pixel Pac-Man, the classic coin-op experience but with characters that consist of just one pixel. Playing a throw-back like this wouldn’t be the same without some vintage controls so I picked up an Atari joystick, patched it into a microcontroller, and started coding. Check it out:
Smartmatrix Bundle
32×32 RGB panel with acrylic diffuser
Back of the Smartmatrix
This piece of hardware made the project build really easy: the Smartmatrix. [Louis Beaudioin] developed the Smartmatrix and it’s been in the Hackaday Store for a while now. The display module itself is a commodity item that is used in LED billboards. There are shrouded headers on the back of the panels, to the left and right sides, which allow them to be daisy chained. The Smartmatrix PCB plugs into one of these shields, provides a soldering footprint for the Teensy 3.1 which drives the display, and gives you the wiring to connect screw terminals from the PCB to the power terminals on the module. Why the need for beefy power jumpers? At full white the thing can draw about 3.5A — don’t worry there’s a power supply included in the bundle.
Also integral to making this look good is the diffuser panel which is frosted acrylic. The Smartmatrix is designed to be housed in a shadowbox frame; it even includes a frame backer board with a cut-out for the Teensy 3.1 so it can be programmed without opening the thing up. I like looking at the guts so I’m leaving my free floating until I come up with an interesting way to mount everything as one unit.
Programming Pac-Man from the Ground Up
If you haven’t looked into it before, the ghost AI and gameplay details for Pac-Man are absolutely brilliant. [Toru Iwatani] did a masterful job with the original, and you should take a look at all of the analysis that has been done over the years. The best collection I could find was the Pac-Man Dossier and I based most of my code on the rules described there.
Basically the ghosts have two modes, chase and scatter. The modes set the enemy targets differently; to points at the four corners of the board in scatter, and to points relative to the player in chase. The relative part is key; only the red enemy actually chases you. Another one of them looks at the red enemy’s distance and angle, and targets the reflection of that vector. Really easy, really clever, and results in enemy behavior that’s believable. It isn’t just the enemy movement, little touches like a speed penalty (1/60 of a second) for each dot the player gobbles up means the enemies can catch up if you continuously eat, but you can escape by taking the path already-eaten.
Library, DMA, and Extra Hardware
Teensy 3.1
DB9 Connector for Joystick
Extras in the Bundle
Kickstarter remote and RTC Module
The hardware and software running the Smartmatrix made the display portions of the project really simple. First off, the Teensy 3.1 is fast, running at 96MHz in this case. Second, it has Direct Memory Access (DMA) which [Louis] used in the Smartmatrix library. This means that driving the display takes almost no CPU time at all, leaving the rest for your own use. This example of a game is under-utilizing this power… it’s totally capable of full-motion video and calculating amazing visualizations on the fly.
The PCB hosting the Teensy 3.1 breaks out several pins to one side. I’m not sure what I’ll add in the future so I actually used the extra surface-mount IO pins on the bottom of the Teensy to connect the Atari joystick (which is simply a set of switches). The are enough pads for two joysticks so I used pin sockets to interface the Teensy to the PCB so that I can get to it again later.
The kit also includes an IR receiver and remote, and also a microSD card to loading animations (there’s an SD socket on the PCB). The bundle in the Hackaday Store is a kit you solder yourself, but [Louis’] company, Pixelmatix, has a Kickstarter running for fully-assembled versions that come with a black remote and sound-visualization hardware.
Future Improvements
The game is fully working, but there are a few key things that I really want to add. The Teensy 3.1 has a single DAC pin available. I’m fairly certain the original coin-op game had mono audio. It should be possible to reproduce the sound quite accurately with this board. That would really make the project pop.
There are also a bunch of touch-ups that need to happen. I’d like to add an animation when the player is eaten by an enemy, and a countdown before the level restarts. The score, shown in binary on the right column, should be scrolled out in decimal when the game ends, and what’s a coin-op recreation without a high-score screen?
The Nintendo 64 is certainly a classic video game system, with amazing titles like Mario Kart 64 and Super Smash Bros that are still being played across the world today. But, like finding new parts for a classic car, finding an original controller that doesn’t have a sad, wobbly, worn-out joystick is getting to be quite the task. A common solution to this problem is to replace the joystick with one from a Gamecube controller, but the kits to do this are about $20USD, and if that’s too expensive then [Frenetic Rapport] has instructions for doing this hack for about $2.
The first iteration of using a Gamecube stick on an N64 controller was a little haphazard. The sensitivity was off and the timing wasn’t exactly right (very important for Smash Bros.) but the first kit solved these problems. This was the $20 kit that basically had a newer PCB/microcontroller that handled the Gamecube hardware better. The improvement which drove the costs down to $2 involves modifying the original PCB directly rather than replacing it.
While this solution does decrease the cost, it sacrifices the new potentiometer and some of the easier-to-work-with jumpers, but what was also driving this project (in addition to cost) was the fact that the new PCBs were becoming harder to get. It essentially became more feasible to simply modify the existing hardware than to try to source one of the new parts.
Either way you want to go, it’s now very easy to pwn your friends in Smash with a superior controller, rather than using a borked N64 controller you’ve had for 15 years. It’s also great to see hacks like this that come together through necessity and really get into the meat of the hardware. Perhaps we’ll see this controller ported to work with other versions of Super Smash Bros, too!
[Florian] has a few arcade games and MAME machines, and recently he’s been trying to embed objects in those hard plastic spheres on the end of joysticks. A common suggestion is to 3D print some molds, but even though that’s a great idea in theory the reality is much different: you’re going to get layer lines on the casting, and a mirror finish is impossible.
No, a silicone mold is the way to do this, but here 3D printing can be used to create the mold for the silicone. Instead of a few pieces of hot glued cardboard or a styrofoam cup, [Florian] is 3D printing a a container to hold the liquid silicone around the master part.
After printing a two-piece part to hold both halves of a silicon mold, [Florian] put the master part in, filled it up with silicone, and took everything apart. There were minimal seam lines, but the end result looks great.
In addition to making a 3D printed mold container, [Florian] is also experimenting with putting 3D printed parts inside these joystick balls. The first experiment was a small 3D printed barrel emblazoned with the Donkey Kong logo. This turned out great, but there’s a fair bit of refraction that blows out all the proportions. Further experiments will include a Pac-Man, a skull, and a rose, to be completed whenever [Florian] gets a vacuum chamber.