BPM180 coding

Was wondering if someone had basic code for the bpm180 to get the relative altitude. I have found sample codes, but they all seem too complicated and include more than I'm looking for.

Pressure varies exponentially with altitude, perhaps you are only interesting in a linear
approximation for small pressure changes?

Have you seen the Sparkfun Tutorial on the BMP180?

It seems pretty basic and the code, while it does more than you want, looks to be well commented.

Just a thought.

Regards,

Brad
KF7FER

I have been trying to make a program with the BPM 180 on the pro mini that would be able to sense when a relative altitude reaches 800 feet.

This would help me for a rocketry project but I haven't been able to figure out exactly how to do it. As of now, I've been working off of the spark fun altitude example code which is designed to print out altitude every couple of seconds. I'm sure what i'm trying to do is very simple, but programming is not one of my strengths, was hoping someone would be able to help me.

Thanks

HI,

Did you google… bmp180 arduino rocketry

Surprising the responses.

Tom… :slight_smile:

Identify the output generating code section and remove it, including the time based sensor reading.
Then insert code to read the sensor permanently (each loop() iteration), and insert whatever should happen when the altitude is reached.

Eventually you have to take into account the rocket acceleration, in case it affects the pressure sensor. It's a good idea to mount the sensor in an orientation where acceleration doesn't affect it much (vertical?).

The mentioned tutorials give some hints, thanks Tom :slight_smile:

Do not cross-post. Threads merged.