I just wanted to share a project I have been working on since I received my BrickPi.
I call it the Auto_Tank (picture and code attached).
Basically it is just the Lego build from the Rigraptor Tank (http://www.dexterindustries.com/BrickPi/projects/tank/) with the following mods:
Added an NXT Ultrasonic Sensor
Added a DI-dGPS
Added a Pi Camera
The code allows the tank to autonomously travel around a room and detect obstacles with the US sensor. When an object is detected, the tank backs up and turns and then proceeds forward again. Every 60 seconds, the Tank tweets its current GPS coordinates. The Pi camera streams live video (great tutorial here: http://blog.miguelgrinberg.com/post/stream-video-from-the-raspberry-pi-camera-to-web-browsers-even-on-ios-and-android) which can be viewed via the web.
Follow the tutorial for the Twitter Weather Station if you have trouble understanding my notes in the TweetTank module. Make sure to fill in your own Twitter credentials in the code where instructed.
The project was fun to do with my 11 year old son, although he was more interested in building the Tank than coding!
I borrowed heavily from existing programs (giving credit of course) but in the process learned how to set up internal threading and calling and running modules.
The Pi camera is launched separate from the attached code following Miguel Grinberg’s great instructions as listed above. Props to Miguel as this is the best implementation of streaming from the Pi Camera I have found. I made his instructions into an executable file that I launch from the Pi GUI. The rest of the tank actions can be launched just by running Auto_Tank.py. Make sure Auto_Tank.py and DI_dGPS_TweetTank2.py are in the same directory.
Hope folks find this fun and useful. Obviously feel free to modify and then share any mods back.