This week our goal was to get the first two sensors up and running. We got the circuit wired up for the BMP180 (the pressure sensor), and tried to find it on the Pi using "i2cdetect -y 1". We hadn't soldered the pins into the breakout board yet, so our information was shotty, but after soldering we got things working.
In order to start collecting readings, we downloaded the Adafruit Raspberry Pi Python Code Library onto the Pi. There wasn't a library for the BMP180, but there is a library for the BMP085, which is a similar board, so we used that, and it seems like it worked.
Below: Data from the BMP180. The errors came from some loose wires.
I was happy to find that this same library included code for the LSM303 sensor as well. We wired that in parallel with the other board into the I2C connections and then...
We have something! But.. It seems like the Magnetometer isn't working quite right as it won't change from its "-4096" value. It stays here even when we put a magnet near it. I'm still not to sure how to read the accelerometer data, but it seems like it is responding logically as I move it around. We will have to come back to this later to figure out what is wrong.
Nonetheless, we finally have two chips wired in and communicating with the Pi. This is good! The pressure sensor seems to be giving reasonable data, and the LSM303 is well... communicating. Of course, we will need to figure that problem out. Eventually we will need to make a program that will take both of these data readings, along with the GPS readings and both camera pictures, and store them in a sort of a table. When the balloon goes up, we want to be able to run this program that will keep collecting data every few seconds or so. Then we will need to be able to extract this data so that we can analyze it in a practical way.
Next step.. try to get the GPS up and running, and then the cameras. I think I will table the LSM303 problems for now until I can talk to some computer scientists who are willing to help. When we have all that going, then we can do some programming to interface them all together to be able to continuously take data.



No comments:
Post a Comment