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.
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 ?
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