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?
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?
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.]
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.