Using OpenCV With The Raspberry Pi

When we first heard of the Raspberry Pi we were elated that projects that once required a full-blown computer could now be done on a tiny, and cheap board running Linux. Unfortunately, we haven’t seen much in the way of using computer vision algorithms on the Raspi, but thanks to [Lentin] the world of OpenCV is now accessable to Raspberry Pi users everywhere.

[Lentin] didn’t feel like installing OpenCV from its source, a process that takes the better part of a day. Instead, he installed it using the synaptic package manager. After connecting a webcam, [Lentin] ssh’d into his Raspi and installed a face detection example script that comes with OpenCV.

It should be noted that [Lentin]’s install of OpenCV isn’t exactly fast, but for a lot of projects being able to update a face tracker five times a second is more than enough. Once the Raspberry Pi camera module is released the speed of face detection on a Raspi should increase dramatically, though, leading to even more useful computer vision builds with the Raspberry Pi.

Multibooting The Raspberry Pi

berryboot

Those of us have been dual booting Linux, Windows, and OS X operating systems for a while will be familiar with bootloaders such as GRUB and its ilk. Surprisingly, though, we haven’t seen a bootloader for the most popular computer of the last year – the Raspberry Pi. It makes sense to have a bootloader for the Raspberry Pi; with dozens of different distributions from Raspbian, Occidentalis, and a bunch of  more esoteric distros, we’re surprised we’re only just now seeing a proper bootloader for the Raspi.

Berryboot is extremely simple to install – just copy it onto a FAT formatted SD card and you can install multiple OSes on your Raspberry Pi. On booting, Berryboot shows a dialog box of all the installed operating systems, with new ones able to be installed over the internet from a Berryboot menu.

You can grab Berryboot over on the gits. Berryboot also works with those Allwinner A10 single board computers, but the Hackaday tip line hasn’t seen hide nor hair of those boards.

Hackaday Links: February 22, 2013

Playstation π

PS3

Yeah, it’s another home made Raspberry Pi case, but [Gabriel]’s Mini Playstation 3.14 is the bee’s knees. The enclosure was once a metal gift box originally intended for gift cards. With a few whacks of a Dremel, the world finally has a new PS3 that runs Linux.

Up there with The Secret Life of Machines

mechatronik

[Mattias] sent in a tip about a really cool TV show airing in Sweden. It’s called Mekatronik, and it’s basically the interesting parts of Mythbusters where [Jamie] and [Adam] build random cool stuff. It’s a Swedish language program, so if anyone would like to make some subs for the episodes, we’ll be more than happy to link to it again.

Web-based software defined radio

sdr

The amateur radio club at University of Twente in the Netherlands came up with something really cool: a web-based software defined radio.  So what, you ask? It’s just streaming audio or something over the Internet? Nope. You can actually control this SDR over the web.

We’re deeply sorry for turning the hardware turn to slag. Really, we are.

Junk box Tesla coil

tesla

[JJ] whipped up a homemade Tesla coil out of junk he had lying around. Basically, it’s a piece of PVC pipe, a tennis ball, and aluminum foil. Even the transformer was pulled from a long-forgotten project. [JJ] is getting some really good arcs, so we’ll call this a win.

Time circuits active

time

[Danilo] was invited to a costume party with a movie theme. He wanted something Back to the Future-is, so he whipped up a flux capacitor (translation). It’s based on a PIC12F675, with the microcontroller running a bit of code that flashes the LEDs just like the movie. Now on to the hoverboard project…

Pair Of Musical Hacks Use Sensor Arrays As Keyboards

sensor-driven-musical-keyboards

This pair of musical keyboard hacks both use light to detect inputs. The pair of tips came in on the same day, which sparks talk of consipiracy theory here at Hackaday. Something in the weather must influence what types of projects people take on because we frequently see trends like this one. Video of both projects is embedded after the jump.

On the left is a light-sensitive keyboard which [Kaziem] is showing off. In this image he’s rolling a marble around on the surface. As it passes over the Cadmium Sulfide sensors (which are arranged in the pattern of white and black keys from a piano keyboard) the instrument plays pitches based on the changing light levels. [Thanks Michael via Make]

To the right is [Lex’s] proximity sensor keyboard. It uses a half-dozen Infrared proximity sensor which pick up reflected light. He calls it a ‘quantised theremin’ and after seeing it in action we understand why. The overclocked Raspberry Pi playing the tones reacts differently based on distance from the keyboard itself, and hand alignment with the different sensors.

Continue reading “Pair Of Musical Hacks Use Sensor Arrays As Keyboards”

Playing With The Minecraft API And A Raspberry Pi

mine

It hasn’t been a week since Minecraft for the Raspberry Pi has been released, and already we’re seeing some cool builds that bridge our analog world with Minecraft voxel land. [Martin] got his hands on the Raspi version of Minecraft and decided to take advantage of the API Mojang threw into the build by making a huge analog block clock that keeps real world time in the Minecraft universe.

Basically, [Martin] created a small Python script that draws the face and hands of a clock in a Minecraft world. The Minecraft API comes with neat functions such as drawCircle, and drawLine, so making a real clock face is as simple as getting the system time and doing a bit of trig.

After the break you can check out [Martin]’s Minecraft clock in action. If you’re running the Pi version of Minecraft, you can also get this running on your machine with the code on [Martin]’s git.

Continue reading “Playing With The Minecraft API And A Raspberry Pi”

Harry Potter Location Clock Spies On Your Smart Phone

harry-potter-clock

The location clock found in the Harry Potter books makes for a really fun hack. Of course there’s no magic involved, just a set of hardware to monitor your phone’s GPS and a clock face to display it.

[Alastair Barber] finished building the clock at the end of last year as a Christmas gift. The display seen above uses an old mantelpiece clock to give it a finished look. He replace the clock face with a print out of the various locations known to the system and added a servo motor to drive the single hand. His hardware choices were based on what he already had on hand and what could be acquired cheaply. The an all-in-one package combines a Raspberry Pi board with a USB broadband modem to ensure that it has a persistent network connection (we’ve seen this done using WiFi in the past). The RPi checks a cellphone’s GPS data, compares it to a list of common places, then pushes commands to the Arduino which controls the clock hand’s servo motor. It’s a roundabout way of doing things but we imagine everything will get reused when the novelty of the gift wears off.

Better PWM On The Raspberry Pi

pi

[Thomas] wanted to play around with a few high-power LEDs and a RaspberryPi. LED controllers usually require some form of PWM to change the brightness of a LED, and unfortunately the Pi only has one PWM pin. [Thomas] could have gotten around this with a custom chip or even an Arduino hanging off the Pi’s USB port. He opted to go with software-based PWM, and did so in a way that is far superior to bit banging a pin.

Conventional wisdom says PWM without a real-time operating system is dumb – right up there with starting a land war in Asia. Turning a pin on and off in a while loop will eat up all the processor power in the Pi, so [Thomas] looked for a better way to do things. He came across the ServoBlaster project by [Richard Hirst] that creates pulses of different lengths by playing with direct memory access; [Richard] created a circular buffer that is read every 10μs. With 2000 values in the buffer, he can control eight different pins with very little impact on CPU usage.

For [Thomas], though, [Richard]’s project wasn’t enough. It was originally written for servos and is only able to drive PWM pins up to about 12%. A quick rewrite of [Richard]’s code allowed [Thomas] to control eight pins with PWM varying from 0% to 100% – and be able to do other things with his Pi in the process.

[Thomas] now has a 40 Watt RGB LED powered by a Raspberry Pi burned into his retina, and the satisfaction of a really clever way of giving the Pi more PWM pins.