Hi, I was wondering if it was possible to collect data from a sensor and save the data with its corresponding time?
I am attempting a project where I connect a rotary encoder to the Arduino and wish to save the angular position against time in a table. I've read that the Arduino can count time on its own and was wondering if what I am trying to do is possible?
Thanks!
What kind of time.
Time between power-up and between changes is easy.
Just save events as millis() in an unsigned long array.
Absolute time (timezone/year/month/day/hour/minute/second) requires a RTC (RealTimeClock) module or NTP (internet time).
Leo..
That is what the millis() function is used for. For time of day and date use the Arduino Timelib.h library. It is not very accurate, and may gain or lose a couple of minutes per day.
Thanks!
Have you got the arduino to display the position of the rotary encoder on its own?
Where are you saving the data? Must it survive a power up/down cycle?
My idea is
Arduino UNO+DS1307 RTC module+SD card+SD card storage board+ Encoder.
The position of your encoder will be stored inside the SD card in a text file. Time and value, both will be written. You will be able to transfer the data to Microsoft excel.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.