Guys i am building a model rocket that has MPU6050, BMP280, a voltage divider to read batt voltage, flash chip and microSD card reader.
Everything is working fine. But when i get the data from all the sensors and also passing between functions, i am using ArduinoJson Library. So i structure all data into Json and pass it thorough functions and also to the outside to my simulator.
As a programmer, i have a urge to structure everythin in Json. But is it a good structure to have ?
I have a simulator that i wrote in python to show rocket position in 3D and other values. But i feel like it is making it slow little bit. Does this effect the performance?
For example instead of structuring the MPU6050's data as below, should i just give it as ypr value next to each other or some other way. Could you please illluminate me on that ?
Everything is working fine. But when i get the data from all the sensors and also passing between functions, i am using ArduinoJson Library. So i structure all data into Json and pass it thorough functions and also to the outside to my simulator.
As a programmer, i have a urge to structure everythin in Json. But is it a good structure to have ?
I have a simulator that i wrote in python to show rocket position in 3D and other values. But i feel like it is making it slow little bit. Does this effect the performance?
For example instead of structuring the MPU6050's data as below, should i just give it as ypr value next to each other or some other way. Could you please illluminate me on that ?
C:
DynamicJsonDocument doc(1024);
doc["CODE"] = "MPU_DATA";
doc["yaw"] = 0;
doc["pitch"] = pitch;
doc["roll"] = roll;
doc["x_accel"] = 0;
doc["y_accel"] = 0;
doc["z_accel"] = 0;