Computer vision is a tricky thing to stuff into a small package, but last year’s Hackaday Prize had an especially interesting project make it into the 50 top finalists. The OpenMV is a tiny camera module with a powerful microcontroller that will detect faces, take a time-lapse, record movies, and detect specific markers or colors. Like a lot of the great projects featured in last year’s Hackaday Prize, this one made it to Kickstarter and is, by far, the least expensive computer vision module available today.
[Ibrahim] began this project more than a year ago when he realized simple serial JPEG cameras were ludicrously expensive, and adding even simple machine vision tasks made the price climb even higher. Camera modules that go in low-end cell phones don’t cost that much, and high-power ARM microcontrollers are pretty cheap as well. The OpenMV project started, and now [Ibrahim] has a small board with a camera that runs Python and can be a master or slave to Arduinos or any other microcontroller board.
The design of the OpenMV is extraordinarily clever, able to serve as a simple camera module for a microcontroller project, or something that can do image processing and toggle a few pins according to logic at the same time. If you’ve ever wanted a camera that can track an object and control a pan/tilt servo setup by itself, here you go. It’s a very interesting accessory for robotics platforms, and surely something that could be used in a wide variety of projects.
[5 Volt Junkie] has built his share of Arduino projects, but never anything with Python, and certainly never anything with a GUI. After listening to Internet radio one day, a new idea for a project was born: a Raspberry Pi with a small touchscreen display for a UI and displaying soma.fm tracks. It’s finally finished, and it’s a great introduction to Python, Pygame, and driving tiny little displays with the Pi.
Playing soma.fm streams was handled by mpd and mpc, while the task of driving a 2.8″ TFT LCD was handled by the fbtft Linux framebuffer driver. This left [5 Volt Junkie] with the task of creating a GUI, some buttons, and working out how to play a few streams. This meant drawing some buttons in Inkscape, but these were admittedly terrible, so [5 Volt Junkie] gave up and turned on the TV. Tron Legacy was playing, giving him the inspiration to complete his Tron-themed music player.
The result of [5 Volt Junkie]’s work is a few hundred lines of Python with Pygame and a few multicolor skins all wrapped up in a Tron theme. It looks great, it works great, and it’s a great introduction to Python and Pygame.
Continue reading “Learning Python With Tron Radio”
The travel meta-search website Kayak apparently used to have a public API which is no longer available. We can’t say we mourn the loss of the interface we’d never known about. If you are someone who was automating their searches for that perfect vacation getaway deal, there’s still hope. But either way you’ll like this one. [Shubhro Saha] figured out how to access the API used by the Kayak mobile app. We like that he details how to sniff the traffic between an app and the internet and make sense of what is found.
His tool of choice is the Python package Mitmproxy. We haven’t heard of it but we have heard of Wireshark and [Shabhro] makes the case that Mitmproxy is superior for this application. As the name suggests, you set it up on your computer and use that box’s IP as the proxy connection for your phone. After using the app for a bit, there is enough data to start deconstructing what’s going on between the app and remote server which which it communicates. We could have a lot of fun with this, like seeing what info those free apps are sending home, or looking for security flaws in your own creations.
[Thanks Juan via Twitter]
As any hacker will attest to, whenever an important tool is missing, you might as well just build a new one! That’s the position that [Matt] found himself in when he was attempting to measure the power consumption at his parents’ house. He left the transmitter for the power meter at home, and so the logical thing to do was to set up a webcam and a python script to monitor his dad’s power meter instead of going back to get his.
The power meter that he had handy was a GEO Minim Electricity Monitor. He found it very difficult to extract the data directly from this particular meter, so instead of digging into any of the communications protocols int he meter, he set up a webcam in a box with an LED and monitored it with a specially-written Python script. The script is able to see the particulars of the meter, and then reports back to the computer with all of the relevant data. [Matt] has put this code up on his project site for anyone to use.
This is a great workaround that doesn’t involve delving too deep into the inner workings of the meter in question. You could always build your own power monitoring system though, if that’s more of your style!
In times of crisis, or extreme government control, it can be difficult to spread critical information to people who can help. A good example of this was during the Arab Spring in 2011. When your Internet connection is taken away, it can feel as though all is lost. Unless you have a ham radio, that is.
For many people the thought of ham radio conjures up images of old guys twisting knobs listening to static, but it’s actually come a long way in our modern digital age. For example, you can now send tweets via ham radio. This project was actually started in 2011 by [Bruce Sutherland]. The Egyptian government had shut down the country’s Internet access after citizens were posting information about the extreme violence they were facing. [Bruce] wanted a way to help others get the word out, and he came up with HamRadioTweets. This system allows a user to send tweets via ham radio.
The system actually piggybacks off of a ham radio service called APRS. This service is most often associated with GPS tracking systems, such as those found in nearspace balloons, but it can also be used to send simple text messages over the air. APRS works thanks to the vast network of receiving stations setup all around the world. These stations can receive messages and then re-transmit them, greatly extending the reach of the original transmitter. Some of them are even hooked up to the Internet to get the messages to go distances that would be extremely difficult and unreliable by traditional means.
[Bruce’s] system hooked into the Internet component and watched for messages being sent specifically to “TWITR”. The Python based system would then read these messages and re-transmit them over Twitter. The project died out a while back after Twitter updated their API. Now, it’s been rebuilt on Ruby by [Harold Giddings]. The project website was handed over to [Harold] and he is currently maintaining it. Hopefully you’ll never need to use this software, but if the time comes you will be glad it’s available. You can watch [Harold] bounce an APRS message off of the International Space Station and on to Twitter in the video below. Continue reading “HamRadioTweets Gets the Word Out”
[Paul’s] project is a great example of how you can take a simple project and turn it into something more interesting. He built himself a jack-o-lantern with an Internet controlled RGB LED embedded inside.
[Paul] first wired up an RGB LED to a Raspberry Pi. He was sure to wire up each color using a 100ohm resistor to prevent the LED from burning out. The web interface was written in Python. The interface is pretty simple. It consists of three text fields. The user enters a value between 0 and 255 for each of the three LED colors. The program then lights up the LED accordingly.
[Paul] realized he would need a diffuser for the LED in order to really see the blended colors properly. Instead of using a common solution like a ping-pong ball, he opted to get festive and use a plastic jack-o-lantern. [Paul] removed the original incandescent bulb from the lantern and mounted the LED inside instead. The inside of the pumpkin is painted white, so it easily diffuses the light. The result is a jack-o-lantern that glows different colors as defined by his party guests. Be sure to check out the demonstration video below.
Are you tired of hammering out the same commands over and over again in GDB? If not, we highly encourage you take more advantage of The GNU Project Debugger, which is a fantastic way to poke around inside your microcontrollers while they’re running a program.
Back to the matter at hand. [Stef] put together a Python program that leverages GDB’s Remote Serial Protocol. He calls it pyrsp and the talk he recently gave about it can be seen below.
The core feature is the ability to add a callback in your C code that triggers the Python script. Think of this a little bit like a print statement, except you have so much more power since it’s Python and GDB doing the “printing”. Anything that can be done at a breakpoint in GDB can now be executed automatically. So if you need to check a group of registers at every loop execution for hundreds of loops your wrists are going to thank you. Better yet, you can use Python to do the sanity checks automatically, continuing when the data is good and alerting you when it’s not. Neat!
Continue reading “Scripting Debug Sessions: Python for GDB Remote Serial Protocol”