Let me begin by saying I know very little about Arduino and programming in general. I am currently working on reviving a pre-existing project that requires the opening and closing of a shutter for a camera at certain specific times. For this, time alarms are used. The time is displayed each minute or second (depending on which you prefer) in the serial monitor and it also displays when the shutter opens and closes.
When I run the sketch, two issues occur:
The time in the serial monitor that is displayed is drastically off of the real time/the time I enter on the computer. (The program is supposed to retrieve the correct time from the computer itself I believe via Time.h)
The shutter opens and then closes immediately regardless of what I do aside from disabling the power to the stepper motor (used to control the shutter) after the shutter has opened. This leads to the issue of the shutter never closing.
Any help would be greatly appreciated. I asked the previous student who was working on this project and he suggested that something might be wrong with the time alarms logic. Apparently, this code worked fine before so I am not sure what I am doing wrong.
I am using Arduino 0022 and the computer is running parallels Windows XP and Mac OSX (not sure if that helps? But it's what's available/I have to use due to other software being installed on the computer for the ongoing project.)
If you are using a pre-1.xx version of the Arduino IDE, why not upgrade - at least to 1.5.6. There will be few helpers that are still using a really old version.
Note that you can have two (or more) versions on your PC, they are just Java programs.
Thank you for the responses! Sorry for my delay with replying, I had no idea anyone replied as I'm unfamiliar with this forum (for some reason I thought it would email me )
To answer your questions, it is my understanding that we are running parallels because the camera software (which is used for IR observations) is more compatible with Windows. Just to clarify, this isn't my home computer or anything, this is in a lab.
I have attached the code. Please let me know if there is anything else that might be helpful.
Also, just as an update, when I open the serial monitor instead of displaying a time (even an incorrect one) it is displaying
"01:00:00 00/01/00" second after second. I am not sure why.
So actually what fixed my RTC time was running TimeRTCSet and then typing "T" followed by the unix time (which I googled, it took two links to get an accurate one basically) in the Serial Monitor (this was suggested to me in another post). Now my main code has the correct date and time.
None of the hardware seems to be responding but in case anyone is having issues with their time syncs...what I mentioned above seemed to work for me:)