[François] lives in Canada, and as you might expect, he loves hockey. Since his local team (the Habs) is in the playoffs, he decided to make an awesome setup for his living room that puts on a light show whenever his team scores a goal. This would be simple if there was a nice API to notify him whenever a goal is scored, but he couldn’t find anything of the sort. Instead, he designed a machine-learning algorithm that detects when his home team scores by listening to his TV’s audio feed.
[François] started off by listening to the audio of some recorded games. Whenever a goal is scored, the commentator yells out and the goal horn is sounded. This makes it pretty obvious to the listener that a goal has been scored, but detecting it with a computer is a bit harder. [François] also wanted to detect when his home team scored a goal, but not when the opposing team scored, making the problem even more complicated!
Since the commentator’s yell and the goal horn don’t sound exactly the same for each goal, [François] decided to write an algorithm that identifies and learns from patterns in the audio. If a home team goal is detected, he sends commands to some Phillips Hue bulbs that flash his team’s colors. His algorithm tries its best to avoid false positives when the opposing team scores, and in practice it successfully identified 75% of home team goals with 0 false positives—not bad! Be sure to check out the setup in action after the break.
Continue reading “Audio Algorithm Detects When Your Team Scores”
If you are interested in local wildlife, you may want to consider this wildlife camera project (Google cache). [Arnis] has been using his to film foxes and mice. The core components of this build are a Raspberry Pi and an infrared camera module specifically made for the Pi. The system runs on a 20,000 mAh battery, which [Arnis] claims results in around 18 hours of battery life.
[Arnis] appears to be using a passive infrared (PIR) sensor to detect motion. These sensors work by detecting sudden changes in the amount of ambient infrared radiation. Mammals are good sources of infrared radiation, so the sensor would work well to detect animals in the vicinity. The Pi is also hooked up to a secondary circuit consisting of a relay, a battery, and an infrared light. When it’s dark outside, [Arnis] can enable “night mode” which will turn on the infrared light. This provides some level of night vision for recording the furry critters in low light conditions.
[Arnis] is also using a Bluetooth dongle with the Pi in order to communicate with an Android phone. Using a custom Android app, he is able to connect back to the Pi and start the camera recording script. He can also use the app to sync the time on the Pi or download an updated image from the camera to ensure it is pointed in the right direction. Be sure to check out the demo video below.
If you like these wildlife cameras, you might want to check out some older projects that serve a similar purpose. Continue reading “Remote Controlled Wildlife Camera with Raspberry Pi”
The Raspberry Pi is a great machine to learn the ins and outs of blinking pins, but for doing anything that requires blinking pins fast, you’re better off going with a BeagleBone. This has been the conventional wisdom for years now, and now that the updated Raspberry Pi 2 is out, there’s the expectation that you’ll be able to blink a pin faster. The data are here, and yes, you can.
The method of testing was connecting a PicoScope 5444B to a pin on the GPIO pin and toggling between zero and one as fast as possible. The original test wasn’t very encouraging; Python maxed out at around 70 kHz, Ruby was terrible, and only C with the native library was useful for interesting stuff – 22MHz.
Using the same experimental setup, the Raspberry Pi 2 is about 2 to three times faster. The fastest is still the C native library, topping out at just under 42 MHz. Other languages and libraries are much slower, but the RPi.GPIO Python library stukk sees a 2.5x increase.
Given the small selection of materials, the entire project is a labor of love. Even the video (after the break) glosses over the careful selection of bearings, bolt-hole spacing, and time-sensitive gear ratios, each of which may be an easy macro in other CAD programs that [Lawrence], in this case, needed to add himself.
Finally, the entire project is open source and up for download on the Githubs. It’s not every day we can build ourselves a pendulum clock with a simple command-line-incantation to
Thanks for the tip, [Bartgrantham]!
Continue reading “Laser-Cut Clock Kicks Your CAD Tools to the Curb and Opts for Python”
If this Internet of Things thing is gonna leave the launchpad, it will need the help of practical and semi-practical project ideas for smartifying everyday items. Part of getting those projects off the ground is overcoming the language barrier between humans that want to easily prototype complex ideas and hardware that wants specific instructions. A company called Things on Internet [TOI] has created a system called VIPER to easily program any Spark Core, UDOO or Arduino Due with Python by creating a virtual machine on the board.
The suite includes a shield, an IDE, and the app. By modifying a simple goose neck IKEA lamp, [TOI] demonstrates VIPER (Viper Is Python Embedded in Realtime). They opened the lamp and added an 24-LED Adafruit NeoPixel ring, which can be controlled remotely by smartphone using the VIPER app. To demonstrate the capacitive sensing capabilities of the VIPER shield, they lined the head of the lamp with foil. This code example will change the NeoPixels to a random color each time the button is pressed in the app.
Check out the lamp demonstration after the break and stay for the RC car.
Continue reading “IoT Chameleon Lamp Does It with Python”
There’s something so nostalgic about the rotary phone that makes it a fun thing to hack and modernize. [Voidon] put his skills to the test and converted one to VoIP using a Raspberry Pi. He used the RasPi’s GPIO pins to read pulses from the rotary dial – a functional dial is always a welcome feature in rotary phone hacks. An old USB sound card was perfect for the microphone and handset audio.
As with any build, there were unexpected size issues that needed to be worked around. While the RasPi fit inside the case well, there was no room for the USB power jack or an ethernet cable, let alone a USB power bank for portability. The power bank idea was scrapped. [voidon] soldered the power cord to the RasPi before the polyfuse to preserve the surge protection, used a mini-USB wifi dongle, and soldered a new USB connector to the sound card. [Voidon] also couldn’t get the phone’s original ringer to work, so he used the Raspberry Pi’s internal sound card to play ringtones.
The VoIP (SIP) was managed by some Python scripting, available at GitHub. [voidon] has some experience in using Asterisk at his day job, so it will be interesting to see if he incorporates it in the future.
Unless you’re some incredibly gifted individual with more dexterity than a fighter jet pilot, making anything on a Etch-a-Sketch is hard. So [Evan] decided to motorize it, and cheat a little bit.
She’s using an Arduino Uno to control two stepper motors that she has bound to the Etch-a-Sketch knobs using a short piece of rubber tube and Gorilla Glue. She 3D printed some custom motor mounts to allow the motors to be positioned directly above the knobs, and a ULN2803 to switch the 12V required for the steppers.
After she had the hardware all setup, she coded a simple Python script to take in .PNGs and produce vector art to be sent through the Arduino. In case you’re wondering, an Etch-a-Sketch has approximately 550 x 370 pixels, or about 500 x 320 for the “safe zone”.
Due to the limitations of the Etch-a-Sketch, like its inability to stop writing, some images might require some editing before sending it off to your new Etch-a-Sketch printer.
Continue reading “Automated Etch-a-Sketch Re-Produces Famous Artwork”