Accelerometer-based Game Control Using An IOS Device Courtesy Of HTML5

This game of Space Invaders is played by tilting your iPhone to the left or right. It’s a demonstration of HTML5 used to link devices in-browser. The only setup that’s required is for the base device to load up a webpage, then the control device scans a QR code (or just types in a link) to connect with the game. You can give it a try right now if you want.

It only works with iOS devices but we believe that’s because mobile Safari has the ability to poll accelerometer data and other browsers do not. If this was using on-screen buttons rather than the tilt controls it would work on any device that implements HTML5. The connection is facilitated by Node.js and Socket.IO. The QR code that is generated by the host machine’s page includes a unique ID which allows the control device to link with it. Once loaded, commands from the controller are sent via Socket.IO to the node on the host machine.

As with this HTML5-based sensor data application, we think this method is important because it allows control without the need for a standalone application. We’re hoping to see a lot of this in embedded projects in the future. By serving data to a smart phone or other device you remove to need for a physical user interface in your projects, which means you can make great things while spending less.

[via Reddit]

Bodging Up A Diesel Motorcycle

[Alex] has been working on a diesel motorcycle project for a few months now, and the project is finally bearing fruit. It’s quite an accomplishment for something [Alex] describes as an industrial Chinese engine, a modded Honda Superdream, and a few Royal Enfield parts thrown in for good measure.

[Alex] bought his Honda CB400 from someone who had already done a diesel motor conversion; a 200cc single-cylinder motor provided just enough horsepower to putt around town. [Alex] wanted a bike that could keep up with highway speeds, so he replaced the wimpy 200cc motor with a 406cc diesel engine used for industrial purposes and an amr500 supercharger.

Although we’ve seen a few insane motorcycle builds, most of Hackaday’s bike builds focus on electric or scavenged parts motorcycles. If you’ve got an awesome motorcycle build you’ve been working on, send it in on the tip line.

You can check out the video of [Alex] testing out his new motor with vegetable oil (for him, it’s easier than getting diesel fuel) after the break.

Continue reading “Bodging Up A Diesel Motorcycle”

[Dino]’s One-year Extravaganza Is A Laser Oscillograph

Readers of Hackaday may have noticed the weekly posts featuring whatever [Dino Segovis] of Hack A Week has cooked up in the last seven days. For [Dino]’s one-year anniversary, he’s pulled out all the stops and put together one of his coolest hacks to date. It’s a laser oscillograph that projects waveforms on a screen just like an oscilloscope. What’s more, the entire contraption is built out of a dead hard drive and a few motors and mirrors [Dino] had lying around.

The build uses an old hard drive to draw the vertical component of the waveform. Because hard drives usually use a voice coil to move the heads around the platter, it’s very easy to connect a hard drive directly to the headphone output of [Dino]’s laptop. Playing a sine wave on his computer makes the drive heads move up and down, but [Dino] still another dimension. For that, he used a rotating mirror that reflects the wave onto a paper screen.

[Dino]’s finished build isn’t that much different from an oscilloscope or projection TV. It’s possible for [Dino] to improve upon his build and make a genuine vector display with the addition of additional electronics and optics, but we’re not expecting that until at least the two-year anniversary.

Check out [Dino]’s build video after the break.

Continue reading “[Dino]’s One-year Extravaganza Is A Laser Oscillograph”

Putting Multitasking On An AVR

[vinod] wanted to familiarize himself with AVR assembly programming, but wanted to do something a little more ambitious than simply blinking an LED. While the completed build does blink a few LEDs, we love that e decided to implement multitasking on his microcontroller.

The program [vinod] came up with uses round robin scheduling to give one of the seven programmed tasks a little bit of compute time every time a timer is triggered. Although it’s extremely simple compared to “real-life” real-time operating systems like VxWorks, it’s still an impressive achievement.

In the video after the break, [vinod] shows off his task-switching with seven LEDs. The white LED is a PWM task, while the six other LEDs are simple toggling tasks  that switch a LED on and off at set intervals independent of each other. This would be hard – if not impossible – to do without some sort of scheduling. Nice work, [vinod].

Continue reading “Putting Multitasking On An AVR”

Turning A Rotary Tool Into A PCB Drill Press

Drilling holes in PCBs is nearly always an exercise in compromise; the holes are small, precision is paramount, and the common solutions, such as a Dremel drill press, aren’t of the highest quality. In a quest to find the best way to drill holes in PCBs, [reboots] even went so far as to get a pneumatic dental drill, but nothing short of a high-quality micro drill press would do. Not wanting to spend hundreds of dollars to drill a few holes, [reboots] did the sensible thing and made one from scratch.

[reboots] ended up buying a Proxxon Micromot 50 after reading the consistently good reviews around the Internet. To use this rotary tool as a drill press required more work, though. Two precision steel rods from a dot matrix printer were salvaged and pieces of aluminum C-channel and small bearings were bolted together into a very high-precision drill press. Only hand tools were used to build this drill press, and the results are amazing.

[reboots] was originally inspired to check out Proxxon tools from one of Hack a Day’s rare tool reviews. The Proxxon TBM115/220 earned the skull ‘n wrenches seal of approval (and found its way into other Hack a Day-ers labs), but sometimes a few hundred dollars is too much of an investment for something only used occasionally. Considering [reboots]’ scrap aluminum drill press is a better tool than the sloppy consumer rotary tool presses, we’ll call this a success.

Re-live 1978 In All Its Glory With The [Roth] Scream Box

roth-scream-box

We never imagined that [David Lee Roth] would mesh well with an Arduino, that is until Flickr user [tgtsfkncld] showed off his [Roth] Scream Box a few days ago.

The unassuming box resembles sort of a nondescript “Easy Button”, but its payload is far more entertaining than whatever Staples could have possibly recorded for their device. Once the Scream Box is powered on, each press of the button rewards the user with a short sound clip of [Roth] singing the lyrics from [Van Halen’s] “Runnin’ With the Devil”.

[tgtsfkncld] took snippets of the isolated vocal track from the song, playing them back using an Arduino along with an Adafruit Wave Shield. The circuitry behind the device is not overly complicated, though the final result is great. With the wide array of isolated vocals floating around online, it would be very easy to create one for your favorite band/singer as well.

Continue reading to see the [Roth] Scream Box in action.

[via Adafruit Blog]

Continue reading “Re-live 1978 In All Its Glory With The [Roth] Scream Box”