Not sure if this is the right area, here or programming.. Please move if wrong.
So, I have a few sensors working and for testing purposes I want to take a short cut to get some "live"data to work with in Processing3 or VPython.
What do I have working:
GPS, NEO 6M
MPU6050 together with HMC5883L
SD Card
Reading values from my RC RX Receiver.
My plan for testing is to log data from these 3 sources onto the SD so I can:
Plot route in Google Maps
See the relation between throttle/steer and the MPU/HMC setup
Put this info in Processing or Vpython to make it visual.
But, and that's why I post this; I am afraid timing is an issue:
GPS, via interrupt. 1HZ is more than enough. I am not really looking for GPS-Speed readout. Just a location every second.
MPU/HMC/Car behaviour. I am not sure. The car will not be going very fast (30mph max) but will accelerate/drift/brake/do stupid stuff a lot. And that is what I am interested in. How does a normal corner compares to 1 that I spin out of? This will also be controlled by Interrupt. Would 10hz be enough to plot the action?
Then the controlling. What did I DO while driving it ok or had it spin out? 10HZ as well? I could not find a way to do this by interrupt so I will have to do this with a timer.
I am afraid that these timers and interrupts will interfere with each other.
Also, at what point do I write to the card? Do I write al data together in a batch, 1 file? or data from every sensor seperately in different files? (when available --write)?
How to orchestrate this? How would you do this?