Realtime recording of Altitude and Compass - data to TFT?

I make a country drive regularly and there's a section of straight road with a few sizeable hills. I want to make a battery portable ardunio unit that I would take in the car as I go over this route - it takes about 60 to 90 seconds to complete the hilled section at a steady 70kph pace - and I want to hit a button to begin the section & to start recording BMP (altitude) and compass heading at a per second rate. When I am finished, it would be cool to display the data readings graphically on a display - maybe an OLED or TFT (hogs more pins). Or, could it be done in real time?

Should I do this with or without an SD data logger?

At some point you will need to STOP and calibrate the BMP and the compass direction and then begin recording.

Either, or logged. 90 seconds at 1 reading per second is only 180 numbers, which can easily be stored in the memory of any Arduino.

I want full control of start stop times. Guess I could fill with dummy data or can I form an array based on number of data points... You thinking EEPROM?

I don't need absolutes necessarily. Relative would be enough to make it fun still. Thought you were going to suggest GPS.

A button is all you need for that.

What is the confusion about storing data? An array is all you need, unless the power is cycled, then you need EEPROM or some other form of nonvolatile memory.

My basic question, then, is this device going to be setting on the seat next to you or is it going to be attached to the vehicle, so the compass will remain oriented, once it is calibrated?

What I asking is, the amount of Data would be user selectable by (you're right) switch operation- at a cycle of Start, Stop. So how would I define the size of the storage array ahead without immediately knowing the number of data points. I could be overthinking it but it seems like I need a dynamic sized array to park the data. I could be 30 seconds one time, 65 seconds another etc etc. [You gave me an idea - if I want to save the data, I could datalog it afterward by pressing a "SAVE" button- prior to a power down. hmm.]

In the cupholder.

Define it to be as large as reasonable without exceeding published memory bounds, and don't collect more data than that.

Dynamic array allocation is not a good idea on small Arduinos.

After a recording, as I parse the array, I suppose if the array wasn't entirely filled - a coded stop bit could trigger the end and set off to graph what was then recorded?

The simplest approach is to keep separate track of how many valid entries are in the array, as well as the maximum allowed.

The best way to answer these questions is to buy an Arduino and start learning how to program it. Plenty of practical examples are included with the Arduino software development package, or can be found on line.

It might be that easy. I'll know how long I recorded for and thus it will be known how many data entries there would be in the array. This up to a maximum of course. BTW, I own and have programmed lots of ardunio and arduino-like products already. This is not a start for me - but sometimes one needs a nudge in concept. Thanks though.

It is that easy. Start writing code and if you run into problems, post again.

If I record a route using the maps app on my phone it can export a gpx(?) file with all this data for any route.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.