3 ms·
As it just so happens I've created a github repo for the project complete with schematics and board files, images and specs. https://github.com/polishdude20/Cy
by polishdude20 6y ago
As it just so happens I've created a github repo for the project complete with schematics and board files, images and specs.
https://github.com/polishdude20/CygnusX1 https://github.com/polishdude20/CygnusX1
The code is written in C++. You can use the Arduino IDE or platformio which is a VScode extension for working with microcontrollers. I use platformio since it's got syntax highlighting and other stuff. The Arduino IDE is really barebones. The board is really close in software to an adafruit feather m4 (same chip and bootloader as well as some config files that I modified).
For controlling the temporal properties, I'm not sure what you mean? The microcontroller runs functions and runs in a loop. You can get certain functions to run every time the loop is executed or have them run at intervals. So there's a setup function that runs once and only once at the beginning which I use to initialize all the sensors and other things. Then inside the loop function I've got various timers triggering at various intervals to run certain functions like checking sensors, converting data, saving data etc.
Processing orientation info starts with the raw gyro values. So I get rad/sec or deg/sec out. Then use a bunch of quaternion math to figure out the yaw, pitch and roll of the rocket in flight. Yes, floating point numbers are used :)