It’s hard to believe that we haven’t covered this one before. If you enjoyed out Barcodechallenges from last week, perhaps now is the time for you to take the Python Challenge. We made it through the first 18 levels about a year back but with a total of 33 levels we’re not even close to being finished.
This is an excellent opportunity to learn Python if you’ve never tried it, or test your skills if you’ve already got them. We’d suggest using IDLE which is available as part of the Python language download. Because Python is an interpreted language, IDLE allows you to try out each line of the code you are writing and add it to your program as you get different sections working.
The levels start out fairly easy and require some sniffing around, such as looking at the source code, and dissecting images with Python’s various libraries. As you pass each level, you will be granted access to the Python Challenge forums in order to see how others solved the level. By solving each level and then seeing what different solutions entail you grow your knowledge of the language and reinforce your understanding of how to use it.
After reading about cheap wireless for microcontrollers, [Leigh] left a comment about his Marauders map. Much like the Harry Potter version, whoever holds the ‘map’ is able to see the location of the ‘marauders’ within certain bounds. Unlike the magical version however, each person being tracked needs to hold a PICAXE 08M, GPS, and 433.92MHz transmitter: while the map needs a computer running his Python script and a receiver of the same frequency. It has the potential for locating people, but we feel it might be better off in a swarmrobotics setup.
[miketysklar] noticed that a local business was having trouble with their sewage lines. People kept flushing tampons down toilets and it ended up clogging the pump. They had already installed a set of lights and horns to go off when it clogged, but they were hoping for SMS capability so they would know wherever they were. The new system piggybacks off the flashing lights by powering an XBee when they are activated. The signal it sends is recieved by another XBee attached to a computer running a python script. The script then sends a SMS via email to the poor fellow who has to fix it.
[Matt Cutts], head developer for google’s anti spam team, describes how to attach a Wii balance board to a linux computer. He even shows how to make a GUI to show the input. The entire project is done in about 200 lines of python.The process assumes that you can already make a bluetooth connection to a WiiMote, but if you can’t, he’s got instructions for that too.
The guys over at NerdKits put together a really informative video on a meat thermometer using predictive filtering which is viewable below. The video, supplemental text, and code is available on their website. The thermometer is constructed of a LM34 temperature sensor attached to a piece of 12 gauge solid copper wire. The thermometer signal is processed on an ATmega168 microcontroller and visualized using the pygame library for python. The real gem in this project is their excellent explanation of predictive filtering, which could easily be utilized for a large number of projects.
[Avi] sent in his PSP as a status monitor hack(zip). He’s using Lua on the PSP, so you have to install LuaPlayer. The computer side is written in python, so it should be cross platform. Last time we saw a psp as an extra monitor, it had more capabilities, but it was limited to Windows. You’ll find the Lua script as well as the python in the zip file. It’s a nice use for an extra psp.
Former Hack a Day contributor [Will] has been using a Eye-Fi SD card to automate his photo transfers. Unfortunately this requires using Eye-Fi’s software and talking to their servers. He used [Jeff Tchang]’s replacement server written in Python to recieve the images from the card. [Will] manages his own online photo gallery using Gallery 2. To get the images uploaded, he added a call to GUP. Now all of his photos are transfered just as easily as with the standard Eye-Fi but without all of the middleman.
[Pedram] Sent us his USB missile launcher interface project. He happened to have some of the USB missile launchers lying around. having lost their initial draw, he wanted to do something to spice it up. He wrote an interface in python so he could control the launcher via his iPhone. We don’t see how this is any different than controlling them by the computer, but he seems to have put a decent amount of work into it.
The fine folks at Midnight Research Labs have put together a new toy for you to play with. It’s a Python script that makes your WiFi hardware behave more like a theremin. Based on the pyaudio library it monitors the signal strength of the AP you’re connected to and changes the tone accordingly. There’s a sample embedded above (direct link). If you have a second interface, you can use it to modulate the volume. It’s an interesting trick, but they say that there’s enough latency that it would be hard to play actual music with it.