Pets, Plants, and Computer Vision
Header

Controlling an LED Light Strip with a RaspberryPi.

April 4th, 2013 | Posted by admin in demo | Electronics | Fun! | Open Source | pics or it didn't happen | RaspberryPi - (Comments Off on Controlling an LED Light Strip with a RaspberryPi.)

IMAG0296

I got a RaspberryPi at PyCon and I had a LED light strip laying around. I wanted to see if I could make the two play nice together. The GPIO pins on the Pi can talk pulse width modulation (PWM) and so did the LED light strip I had, so I figured I could get the two to talk. I found this really awesome tutorial that walked me through the process. The gist of the tutorial is that you use low current signals from the RaspberryPi to control high current signals coming from some wires plugged into an AC adapter (in this case a 12V/1A switchable AC adapter I picked up at Radio Shack). You do this by using a Darlington transistor, specifically a TIP120 transistor, which you can pick up at your local Radio Shack for $1.69. The transistor is basically a voltage controlled current source. To control the transistors you use the ServoBlaster C library. This library basically does the PWM and tells the RaspberryPi to set a particular pin high or low. You call the ServoBlaster module via the command line. The author of the original tutorial uses a swell little python script to repeatedly make command line calls and then sleep the python program.

You can see the results below. The track playing in the background is Marijuana by Chrome Sparks.

The next step is to use SimpleCV to acquire images from a USB camera and peg the LED colors to the average image color. I would also like to use a few buttons to start and stop the lights as well as some MP3s (think instant dance party).

If you are curious I am using a $25 LCD for the screen of the RaspberryPi. It didn’t come with an AC Adapter or a composite video cable so I had to buy those separate. I also picked up a USB wireless card and a powered USB hub which come in really handy. I was really pleased when the wireless card worked out of the box with the Raspbian OS Wheezy release. My mini panvice is great for holding the pi. I also picked up a set of male/female jumper cables that made wiring everything a snap.

Last FRC 830 Match of the Season

March 31st, 2013 | Posted by admin in Uncategorized - (Comments Off on Last FRC 830 Match of the Season)

Team 830 had it’s last meet of the season at Livonia yesterday. Everyone came together and finally got the robot to a competitive state. I have no doubt that if we had gotten the robot to this state by the beginning of the first meet we would have made it to states. It was most of the team’s rookie year (both student’s and mentors) and by all measures I think we did fantastic. By the end of the competition we were making three point shots all the way from across the field (over fifty feet!). Despite being ranked twenty first after the qualifying rounds the students were not selected to move on to the elimination round. However, the students received the Kleiner Perkins Caufield and Byers award for best business plan. Team 830 has big ideas about how we can raise money for the team over the summer, and I am excited to see where that leads. Below is a video I captured a video of our last match of the season.

ROBOTS FIGHT!

March 26th, 2013 | Posted by admin in Ann Arbor | automation | Automation Alley | demo | Education | FIRST | Fun! | robots - (Comments Off on ROBOTS FIGHT!)

FRC830 has our second competition of the season in Livonia this weekend. We had the competition bot unbagged for a few hours today and decided to give our drivers some time to practice.

PyCon Talk and Tutorial

March 22nd, 2013 | Posted by admin in code | computer vision | demo | Education | Open Source | PyCon | SightMachine | SimpleCV - (Comments Off on PyCon Talk and Tutorial)

I wanted to put all of my PyCon stuff in one place for easy reference. When I get a moment to breathe I want to do a write up about what it took to put everything together.

Here is the short talk I gave.

Here are the slides from the tutorial:

The course materials can be found in this github repo.

Here is the full three hour tutorial: