High altitude balloon project: FMC Python source
Like others, I'm launching a high-altitude balloon to take photographs and obtain environmental data from the edge of space. But mostly just for the enjoyment of doing it. I started out planning to use an AVR MCU for the main flight management computer onboard the payload. In fact, if you want to see the original code for that project, it's here on github. I'm no longer maintaining it; and it never flew. So caveat emptor.
The new firmware is mostly written in Python. I'm an iOS and Mac developer by day, so it's not very pythonic; but being able to work at that level of abstraction made the entire project go much faster than writing string parsing code, etc. in C would have permitted. The firmware runs on Raspberry Pi which is tiny Linux-based computer.
camera module uses
gphoto2 to capture images from a compatible USB-connected camera and stores them on a mounted flash drive.
The payload hardware features a small HIH-4030 analog humidity monitor that is mounted to the outside of the package.
1-Wire temperature monitors
The firmware measures interior and exterior temperatures using DS18B20 1-wire devices. One is mounted on the accessory circuit board inside the payload. The other is external.
Barometric pressure monitor
The firmware polls an ADXL335 analog 3-axis accelerometer for acceleration data via an I2C bridge. The bridge is provided by an ATtinyx61 as I described here. This makes up for the lack of ADC onboard the Raspberry Pi.
We support a serial-connected GPS. Note that for high-altitude applications, you need to ensure that your GPS will function above 18 km in altitude. Most do not.
The software may or may not be of use to you as-is without the same hardware as I'm using; but you can be the judge of that. At a minimum, you can look at the drivers, protocols, etc. to see how I solved the various problems.