Python on a microcontroller

posted Sep 26th 2011 1:01pm by
filed under: Microcontrollers

The team at LeafLabs was looking for something cool to do with their new ARM development board. [AJ] asked if anyone had ever played around with Python, so [Dave] cooked up an implementation of PyMite and put it on a Maple board. While the writeup is only about blinking a LED with a microcontroller, they’re doing it with Python, interactively, and at runtime.

The build uses the Maple Native board the team is developing. The board has a 32-bit ARM chip with 1 Meg of RAM – more than enough horsepower to run PyMite. The tutorial for putting PyMite on a Maple is up on the LeafLabs wiki.

PyMite is theoretically able to control every pin on the Maple Native and do just about everything a regular Python distro can do. The LeafLabs team is still working on the necessary libraries for their board (although we don’t see anything on the Google code page), so right now only blinking the LED is supported. Still, it’s pretty cool to have Python in your pocket.

A cellphone based Interactive Voice Response System

posted Aug 30th 2011 11:08am by
filed under: cellphones hacks

We’re all familiar with IVRS systems that let you access information using a touch-tone telephone. [Achu Wilso] built his own version which uses a cellphone, microcontroller, and computer.

The cellphone is monitored by an LM324 op-amp with an attached 555 timer chip. When a call comes in the voltage on the headphone output goes high, activating the timer circuit. If it goes low and does not go high again for about 25 seconds the call will be ended. Each incoming touch tone acts as a keepalive for the circuit.

An MT8870 DTMF (touch tone) decoder chip monitors the user input. An ATmega8 microcontroller grabs the decoded touch tones from that chip, and pushes them to a PC via USB. The PC-side software is written in Python, using MySQL bindings to access database information. eSpeak, the open source speech synthesizer software is used to read menu and database information back to the caller.

Not a bad little system, we wish there was an audio clip so we could hear it in action.




Zigbee home automation gives us another reason not to get up

posted Aug 24th 2011 2:08pm by
filed under: home hacks, Software Development

[Russell] sent in a neat home automation project he’s been working on. Even though the project only has two devices so far, we can already see the potential of his project.

Instead of the X10 standard that has been a staple of home automation for more than 30 years, [Russell] went with ZigBee modules. Aside from being much faster and more flexible than X10 home automation modules, ZigBees also open up a bunch of projects that would be impossible if he went with X10. With some well-placed IR transmitters hidden in his living room, it would be possible to have a TV and cable box controlled via the Internet.

So far, [Russell] built an network-controlled RGB ‘mood lamp’ and an infrared remote for his central air. Everything is controlled through a web app, and [Russell] says that additional modules can be easily added to the code.

Check out [Russell]‘s demo of his project after the break.

Read the rest of this entry »

Minecraft is now a 3d design tool

posted Jul 7th 2011 2:09pm by
filed under: cnc hacks

[Cody Sumter] and [Jason Boggess] are students at the MIT Media Lab, and they just came up with Minecraft.Print(), an attempt to create a bridge between Minecraft and the real world via 3D Printers.

The print is first prepared by placing obsidian, diamond, gold, and iron blocks on opposite corners of the model in Minecraft. From there, a Python script takes over and parses the world map to generate an .STL file for a RepRap or MakerBot.

So far, [Cody] and [Jason] have printed a few Companion Cubes and the model of the Enterprise D. We’re pretty impressed with the resolution of the prints, especially considering the original model is voxelated. The prints look very nice, and right now we really want to print out all the cool stuff we’ve seen, like Isengardgigantic CPU, or maybe a Minecraft 3D printer.

Minecraft.Print() sure is a nice program [Cody] and [Jason] have there. It would be a shame if anything happened to it. Check out a video demo after the break.

Read the rest of this entry »

Twitter notifier lets us know how awesome we are

posted Jun 22nd 2011 4:05am by
filed under: arduino hacks, led hacks

twitter_notifier

Let’s admit it, you’re just a little bit vain. Heck, we’re all just a little bit vain when you really think about it. Instructables user [pdxnat] was self-absorbed enough that he constructed an LED “mood light” that alerts him each time someone mentions his user name on Twitter.

The build is pretty simple, with most of the work being done on his PC. His Arduino is wired to a simple RGB LED that calmly cycles through various colors until someone mentions his name on Twitter. At that point, the client software running on his PC passes a message to the Arduino over a serial interface, causing it to wildly pulse the LED. Once it catches his eye, he stops the alert cycle with the press of the reset button, returning the LED to its previous state. As a bonus, he decided to write the Twitter-polling application in both Processing and Python, enabling fans of either language to easily replicate his work.

It’s a pretty cool idea, and it would be great to see someone expand it to include other online services to provide a greater overall feel for how awesome they really are.

Keep reading to see a quick video of the notifier in action.

Read the rest of this entry »




Facebook notifier uses some papercraft and simple electronics

posted May 24th 2011 8:30am by
filed under: arduino hacks

This weekend project will tell you when you’ve got something new to look at on your Facebook page (translated). The yellow flag on the side of the mini-mailbox automatically goes up, alerting you to your recent online popularity.

[Rocco's] craftwork on this project is fantastic. We love the scale, the colors, and especially the artificial grass that adorns the base. Inside the mailbox an Arduino controls a small servo motor attached to the new mail flag. As with other Arduino-based notifiers (be it the Internet Furby, or our own troll sniffing rat) the USB connection makes it incredibly easy to convert online information to real-world signals. The client side of this is a Python script. It uses a package that we were previously unfamiliar with called mechanize. We’ve just made a cursory examination of how that package is used, but we’re going to keep it in mind as an alternative to our usual go-to package, BeautifulSoup, which tends to be a bit hairy when you’re just looking for some basic data.

Automate repetitive PC actions with a foot pedal

posted May 5th 2011 5:01am by
filed under: arduino hacks, pcs hacks

foot_pedal

Instructables user [bkovac] was sick of clicking the terminal icon on his desktop whenever he wanted to launch a terminal window. Keyboard shortcuts aside, he figured the easiest way to take the tedium out of the process would be to launch terminal windows with a foot pedal.

He grabbed a pedal that he had sitting around in his workshop and took it apart to ensure the switch contacts were configured for his particular use. The wires were run to an Arduino which talks to the computer over serial using a Python script.

While the setup works just fine, it’s definitely not the most efficient or simplest way of getting the job done. In fact, we have seen other methods that are quite a bit simpler, though they lack the potential versatility of this particular modification.

Rather than simply loading a terminal window on his computer, we would love to see this pedal enhanced to perform multiple functions – at which point the Arduino would be a pretty decent choice. We would probably start out by swapping out the full-sized Arduino for a Teensy, mounting it inside the pedal. Multiple foot presses could be used to trigger different events, based upon the number of presses that occur within a given time period. It could be made even more useful by using it to trigger gesture-based events, similar to those seen in plug-ins for Chrome and Firefox.

How would you enhance [bkovac’s] pedal interface? Let us know in the comments.

Real-time robotic arm control with Blender

posted May 4th 2011 5:00am by
filed under: arduino hacks, robots hacks

robotic_arm

Last year, [Justin Dailey] was coming down the home stretch of his senior year as a Computer Engineering student and needed to build a final design project. He always wanted to construct a robotic arm, and figured that there was no better way to legitimize such a project, than to claim that it was “homework”.

While he originally wanted to control the arm with a joystick, he had been messing with Blender quite a bit leading up to his final project, and thought it would be pretty cool to let Blender do the work. He started out by testing his ability to control a single servo with Blender, then slowly increased the complexity of the project. He prototyped the arm using cardboard, and satisfied with his progress thus far, began constructing the arm out of aluminum.

Once he had all six of his servos attached to the arm’s joints and wired to his Roboduino, he got busy constructing a 3D model in Blender. Using a few Python scripts, the movements inside Blender are translated to serial data in real-time, which is relayed to the Roboduino in order to control the arm.

Check out his site if you get a chance – there’s plenty of code to be had, as well as several videos of the arm in various stages of construction and testing.




Hack a Day serves up fresh hacks each day, every day from around the web as well as hacking related news.

Send us your hacks






     




Hacks

Resources