Hi all,
I need help.... (yes, I know people have been saying that for years.... )
I have nearly finished a datalogger and controller and am facing my final two problems...
The first problem is with using an RTC.
the controller needs to perform two functions, one is to turn a machine (and associated ancillaries on and off, and the second is to record data.
In the case of turning the machine on and off, I need to input a time in seconds, ranging from 1 to 1800 seconds entered by a matrix keypad. All of that works perfectly.
once a start button is pressed, I want the RTC to act as a timer in seconds, and then stop the machine after that amount of seconds. Can I read the clock and then 'add' the number of seconds to create a finish time?
during the time the machine is running, I want to monitor several sensors every 10 seconds and export that data (either to an SD card, serial line or via Bluetooth).
I have every function working, except the timer running in seconds. I have a tiny RTC running on I2C. could anyone help guide me on that bit of code please?
I have included the loop(); area of code, and also the cycle mode (where the timing needs to take place..... Unfortunately, as I have used the tab function to create the code, and there are currently 11 tabs, I cannot include the full code, however, the two relevant parts are present.
any help would be much appreciated
ECM_Acid_Datalogger_v1.1.ino (8.0 KB)
cycleMode.ino (665 Bytes)