Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timer Will not count up #10

Open
Steve-GB opened this issue Apr 30, 2016 · 11 comments
Open

Timer Will not count up #10

Steve-GB opened this issue Apr 30, 2016 · 11 comments

Comments

@Steve-GB
Copy link

Hello Andrew,
I'm having some issues with my code, I wonder if you could take a look please.
http://pastebin.com/8PF14JvL

This project drives an LED display with a RTC or a counting up stop watch.
The display shows 00 00 01 and doesnt show anything more, I've addedd the serial debug in to watch it and that two just shows 0:0:1 and nothing more.

It seems the counter isnt running for some readon. I have even tried the examples and they stop after showing one second. do you have any ideas ?
thanks,

@AndrewMascolo
Copy link
Owner

When did you download the library?

Sent from my iPhone

On Apr 30, 2016, at 1:38 PM, Steve-GB [email protected] wrote:

Hello Andrew,
I'm having some issues with my code, I wonder if you could take a look please.
http://pastebin.com/8PF14JvL

This project drives an LED display with a RTC or a counting up stop watch.
The display shows 00 00 01 and doesnt show anything more, I've addedd the serial debug in to watch it and that two just shows 0:0:1 and nothing more.

It seems the counter isnt running for some readon. I have even tried the examples and they stop after showing one second. do you have any ideas ?
thanks,


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub

@AndrewMascolo
Copy link
Owner

Try it now. Redownload the library first.

Sent from my iPhone

On Apr 30, 2016, at 1:38 PM, Steve-GB [email protected] wrote:

Hello Andrew,
I'm having some issues with my code, I wonder if you could take a look please.
http://pastebin.com/8PF14JvL

This project drives an LED display with a RTC or a counting up stop watch.
The display shows 00 00 01 and doesnt show anything more, I've addedd the serial debug in to watch it and that two just shows 0:0:1 and nothing more.

It seems the counter isnt running for some readon. I have even tried the examples and they stop after showing one second. do you have any ideas ?
thanks,


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub

@Steve-GB
Copy link
Author

Steve-GB commented May 1, 2016

Hello.
Yes, thats done it. What was the fix ?
Thanks.

@AndrewMascolo
Copy link
Owner

Just some minor reordering in the code.

Sent from my iPhone

On May 1, 2016, at 5:49 AM, Steve-GB [email protected] wrote:

Hello.
Yes, thats done it. What was the fix ?
Thanks.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub

@Steve-GB
Copy link
Author

Steve-GB commented May 1, 2016

HI, I've noticed another anomaly now.
When T.StartTimer(); is first set and the time begins to count, if a T.ResetTimer(); is then performed the timer goes back to zero and starts again as expected. if then a T.PauseTimer() is then set, instead of pausing it returns to zero again and starts counting. if a second T.PauseTimer() is set then it ignores it and if a third is set the timer pauses. if then T.ResumeTimer() is set the timer doesnt resume. A reset will work though returning to zero as expected. then if another resume is set then it counts 1 and stops. and second resume and the timer starts to count again.

Sorry if this sounds a bit confusing, I'm using the same code as posted above.

If I reset the audrino and do not use the reset while the timer is running then all seems to be okay. It seems it doesnt like being reset whilst its running. it has to be paused then reset and then resumed.

@AndrewMascolo
Copy link
Owner

Yes because the library uses flags to start, stop and pause. If you reset midway then the flag will not be set to do the action you require without doing the process over. If you reset you must start again, if you pause you must resume.

Sent from my iPhone

On May 1, 2016, at 11:17 AM, Steve-GB [email protected] wrote:

HI, I've noticed another anomaly now.
When T.StartTimer(); is first set and the time begins to count, if a T.ResetTimer(); is then performed the timer goes back to zero and starts again as expected. if then a T.PauseTimer() is then set, instead of pausing it returns to zero again and starts counting. if a second T.PauseTimer() is set then it ignores it and if a third is set the timer pauses. if then T.ResumeTimer() is set the timer doesnt resume. A reset will work though returning to zero as expected. then if another resume is set then it counts 1 and stops. and second resume and the timer starts to count again.

Sorry if this sounds a bit confusing, I'm using the same code as posted above.

If I reset the audrino and do not use the reset while the timer is running then all seems to be okay. It seems it doesnt like being reset whilst its running. it has to be paused then reset and then resumed.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub

@Steve-GB
Copy link
Author

Steve-GB commented May 2, 2016

HI,

Yes, That’s working thanks.

What was the fix ?

From: AndrewMascolo [mailto:[email protected]]
Sent: 30 April 2016 20:44
To: AndrewMascolo/CountUpDownTimer [email protected]
Cc: Steve-GB [email protected]; Author [email protected]
Subject: Re: [AndrewMascolo/CountUpDownTimer] Timer Will not count up (#10)

Try it now. Redownload the library first.

Sent from my iPhone

On Apr 30, 2016, at 1:38 PM, Steve-GB [email protected] wrote:

Hello Andrew,
I'm having some issues with my code, I wonder if you could take a look please.
http://pastebin.com/8PF14JvL

This project drives an LED display with a RTC or a counting up stop watch.
The display shows 00 00 01 and doesnt show anything more, I've addedd the serial debug in to watch it and that two just shows 0:0:1 and nothing more.

It seems the counter isnt running for some readon. I have even tried the examples and they stop after showing one second. do you have any ideas ?
thanks,


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHubhttps://github.com//issues/10#issuecomment-215989714

@Steve-GB
Copy link
Author

Steve-GB commented May 2, 2016

That makes sense. I'm keeping track of the state I want the timer in so if it's running and the reset is pressed, I'll issue the stop first, then reset and then start again.

Unless you want to put that in the library ?

Sent from my HTC

----- Reply message -----
From: "AndrewMascolo" [email protected]
To: "AndrewMascolo/CountUpDownTimer" [email protected]
Cc: "Steve-GB" [email protected], "Author" [email protected]
Subject: [AndrewMascolo/CountUpDownTimer] Timer Will not count up (#10)
Date: Sun, May 1, 2016 18:21

Yes because the library uses flags to start, stop and pause. If you reset midway then the flag will not be set to do the action you require without doing the process over. If you reset you must start again, if you pause you must resume.

Sent from my iPhone

On May 1, 2016, at 11:17 AM, Steve-GB [email protected] wrote:

HI, I've noticed another anomaly now.
When T.StartTimer(); is first set and the time begins to count, if a T.ResetTimer(); is then performed the timer goes back to zero and starts again as expected. if then a T.PauseTimer() is then set, instead of pausing it returns to zero again and starts counting. if a second T.PauseTimer() is set then it ignores it and if a third is set the timer pauses. if then T.ResumeTimer() is set the timer doesnt resume. A reset will work though returning to zero as expected. then if another resume is set then it counts 1 and stops. and second resume and the timer starts to count again.

Sorry if this sounds a bit confusing, I'm using the same code as posted above.

If I reset the audrino and do not use the reset while the timer is running then all seems to be okay. It seems it doesnt like being reset whilst its running. it has to be paused then reset and then resumed.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHubhttps://github.com//issues/10#issuecomment-216056977

@AndrewMascolo
Copy link
Owner

I will make a note of it and if more people have that issue, I will add it.

Sent from my iPhone

On May 2, 2016, at 7:53 AM, Steve-GB [email protected] wrote:

That makes sense. I'm keeping track of the state I want the timer in so if it's running and the reset is pressed, I'll issue the stop first, then reset and then start again.

Unless you want to put that in the library ?

Sent from my HTC

----- Reply message -----
From: "AndrewMascolo" [email protected]
To: "AndrewMascolo/CountUpDownTimer" [email protected]
Cc: "Steve-GB" [email protected], "Author" [email protected]
Subject: [AndrewMascolo/CountUpDownTimer] Timer Will not count up (#10)
Date: Sun, May 1, 2016 18:21

Yes because the library uses flags to start, stop and pause. If you reset midway then the flag will not be set to do the action you require without doing the process over. If you reset you must start again, if you pause you must resume.

Sent from my iPhone

On May 1, 2016, at 11:17 AM, Steve-GB [email protected] wrote:

HI, I've noticed another anomaly now.
When T.StartTimer(); is first set and the time begins to count, if a T.ResetTimer(); is then performed the timer goes back to zero and starts again as expected. if then a T.PauseTimer() is then set, instead of pausing it returns to zero again and starts counting. if a second T.PauseTimer() is set then it ignores it and if a third is set the timer pauses. if then T.ResumeTimer() is set the timer doesnt resume. A reset will work though returning to zero as expected. then if another resume is set then it counts 1 and stops. and second resume and the timer starts to count again.

Sorry if this sounds a bit confusing, I'm using the same code as posted above.

If I reset the audrino and do not use the reset while the timer is running then all seems to be okay. It seems it doesnt like being reset whilst its running. it has to be paused then reset and then resumed.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHubhttps://github.com//issues/10#issuecomment-216056977

You are receiving this because you commented.
Reply to this email directly or view it on GitHub

@Steve-GB
Copy link
Author

Steve-GB commented May 2, 2016

I’ve not tried yet. But will your counter support two instances?

I will ultimately want two stop watches on the project.

From: AndrewMascolo [mailto:[email protected]]
Sent: 01 May 2016 18:21
To: AndrewMascolo/CountUpDownTimer [email protected]
Cc: Steve-GB [email protected]; Author [email protected]
Subject: Re: [AndrewMascolo/CountUpDownTimer] Timer Will not count up (#10)

Yes because the library uses flags to start, stop and pause. If you reset midway then the flag will not be set to do the action you require without doing the process over. If you reset you must start again, if you pause you must resume.

Sent from my iPhone

On May 1, 2016, at 11:17 AM, Steve-GB [email protected] wrote:

HI, I've noticed another anomaly now.
When T.StartTimer(); is first set and the time begins to count, if a T.ResetTimer(); is then performed the timer goes back to zero and starts again as expected. if then a T.PauseTimer() is then set, instead of pausing it returns to zero again and starts counting. if a second T.PauseTimer() is set then it ignores it and if a third is set the timer pauses. if then T.ResumeTimer() is set the timer doesnt resume. A reset will work though returning to zero as expected. then if another resume is set then it counts 1 and stops. and second resume and the timer starts to count again.

Sorry if this sounds a bit confusing, I'm using the same code as posted above.

If I reset the audrino and do not use the reset while the timer is running then all seems to be okay. It seems it doesnt like being reset whilst its running. it has to be paused then reset and then resumed.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHubhttps://github.com//issues/10#issuecomment-216056977

@AndrewMascolo
Copy link
Owner

It should yes, there is nothing there that uses static variables.

Sent from my iPhone

On May 2, 2016, at 12:32 PM, Steve-GB [email protected] wrote:

I’ve not tried yet. But will your counter support two instances?

I will ultimately want two stop watches on the project.

From: AndrewMascolo [mailto:[email protected]]
Sent: 01 May 2016 18:21
To: AndrewMascolo/CountUpDownTimer [email protected]
Cc: Steve-GB [email protected]; Author [email protected]
Subject: Re: [AndrewMascolo/CountUpDownTimer] Timer Will not count up (#10)

Yes because the library uses flags to start, stop and pause. If you reset midway then the flag will not be set to do the action you require without doing the process over. If you reset you must start again, if you pause you must resume.

Sent from my iPhone

On May 1, 2016, at 11:17 AM, Steve-GB [email protected] wrote:

HI, I've noticed another anomaly now.
When T.StartTimer(); is first set and the time begins to count, if a T.ResetTimer(); is then performed the timer goes back to zero and starts again as expected. if then a T.PauseTimer() is then set, instead of pausing it returns to zero again and starts counting. if a second T.PauseTimer() is set then it ignores it and if a third is set the timer pauses. if then T.ResumeTimer() is set the timer doesnt resume. A reset will work though returning to zero as expected. then if another resume is set then it counts 1 and stops. and second resume and the timer starts to count again.

Sorry if this sounds a bit confusing, I'm using the same code as posted above.

If I reset the audrino and do not use the reset while the timer is running then all seems to be okay. It seems it doesnt like being reset whilst its running. it has to be paused then reset and then resumed.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHubhttps://github.com//issues/10#issuecomment-216056977

You are receiving this because you commented.
Reply to this email directly or view it on GitHub

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants