AndrewMascolo / CountUpDownTimer

MIT License
28 stars 20 forks source link

no matching functions for call 'CountUpDownTimer::SetTimer(int, int, int) #32

Open ABartholsen opened 3 years ago

ABartholsen commented 3 years ago

Why do i get "no matching functions for call ..." when running my code when using the CountUpDownTimer?

I get it when i try MeisterMax's code as well:

include

include "LiquidCrystal.h"

CountUpDownTimer T(DOWN); LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {

lcd.begin(16, 2); T.SetTimer(0, 2, 45); T.StartTimer();

}

void loop() {

T.Timer();

lcd.setCursor(0, 0); lcd.print(T.ShowSeconds()); lcd.setCursor(0, 1); lcd.print(T.ShowMinutes());

}

I suspect i am doing something wrong with importing the library or something. I am a bit of a noob, so I might be messing something trivial up. Just saying :P

ABartholsen commented 3 years ago

Has the library been changed, is that what is going on?

AndrewMascolo commented 3 years ago

I just recently changed the library and if you have downloaded it in last 4 weeks or so, then so his code is out of date. The SetTimer method now takes 4 arguments (day, hour, minute, second). His code didn’t have days.

Sent from my iPhone

Sent from my iPhone

On Mar 18, 2021, at 10:16 AM, ABartholsen @.***> wrote:  Has the library been changed, is that what is going on?

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

ABartholsen commented 3 years ago

Yes, that seems to do it! Thanks mate :)

ABartholsen commented 3 years ago

Well the program compiles and is downloaded fine now, (my own program and not the example I posted) but somehow the task the program is suppose to execute is not run. It was suppose to run after 10 seconds. Not quite sure why. I am thinking it might be worth trying to run the program with the old library. Is it available somewhere?

ABartholsen commented 3 years ago

I saw that the older versions are found under commits, but cant download the zip. How do i get to download it?

AndrewMascolo commented 3 years ago

I don’t think they can be downloaded. I didn’t really change anything else so I’m not sure why it doesn’t work. You are welcome to play with the library as I don’t really maintain it anymore. If you figure out what’s wrong, I’ll add those fixes to the library.