I’m new to the forum but am seeking some help with a programming question. I’m currently using an ESP8266 dev kit with a few modules including an MMA845X accelerometer, an HMC5883L magnetometer, a MicroSD adapter, and a Neo-6MV2 GPS unit.
I’ve successfully coded each individual component to execute their intended functions, but I cannot get them to all operate using the same code file. I think this is because my GPS code relies on whenever the speed is updated/fixed, and the other components rely on using the delay() function.
I currently have the accelerometer, magnetometer, and SD card modules all working together (since they all rely on the delay() function to update new values), but I can’t get the GPS to work together with the other code. I’ll post both codes at the bottom of the post.
I need the data values from all components to be printed together per update
Make note: I am using a code that changes the update frequency on the GPS from 1Hz to 5Hz. At a minimum, I’d like all values to be updated at 5Hz (every 0.2 seconds).
Any help I can get would be great!
GPS.ino (2.98 KB)
accel_mag_sd.ino (2.9 KB)