Bmp 280, use data in code

Hello everybody, i am still quite new to the world of programming however i am trying to learn a lot.

i'm trying to build a model rocket and control the timing of the ignition, the propellant, which is meant for the deployment of the parachutes, via a teensy3.2. i have a BMP280 connected (which btw. runs perfectly) and now i want to incorporate the data about the altitude into my code. unfortunately there is not so much about it on YT....

My idea for a code:

{
if (current alt. < (cuurrent alt.-1sec)
deploy parachute
}

--> this is of course not a real code, just an idea how it COULD run.

thanks in advance

david

1 Like

I know that you understand that if (current alt. < (cuurrent alt.-1sec) is wrong

To me it seems to say "if the current altitude is less than the altitude one second ago" then it is time to do something. ie, the rocket has started to fall so it is time to deploy the parachute

If that is right you need to measure the altitude every second so that you can compare it with the next reading. This is quite easy to do. What code do you have to measure the altitude ?

1 Like

This thread regarding the difficulty of using air pressure to detect apogee (for parachute deployment) should be interesting to the OP: Using a BMP180 sensor on a rocket - #15 by jremington

heyoo thanks for youranswer.

I understand the Code, it was my idea.... hahaha

I found a library in the internet thats provides me a test code, so I can let show me the current alt./ temp. ect...

my problem is, I cant use those numbers, i need a system which can monitor the altitude, use the numers in code to compare it and in the future save them on an external device. am SD-Card for example.

so i annyone can tell me how to write the code ore give me an article, that would be awsome

have a nivce Day

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.