High Coding Badly, Thanks for the reply,
Impossible to say. You have not defined what “inaccurate” means in your application.
You are quite right , I didnt, but as I said it was for a clock I had assumed people would guess I didnt
want to make it any more inacurate that I need to ( within reason),but I can see from your answer that it was my mistake and I need to be more carefull how I word it next time
I doubt the processor is going to be too upset that its time has been wasted. If it does get upset, get it something nice like an I2C CANBUS controller.
No, I also doubt the processor will be upset, but depending how many tasks I need to do between updates of the clock , I might be upset if I run out of time to do them , because I wasted it making unneccesary calls to millis()
Your math is seriously flawed. In that scenario, the “wasted time” is CONSIDERABLY less than 75%.
No not my math .Once again my description was not accurate enough for you . I had not meant the total processing time but the time spent processing the millis() calls .If i called it 4 times when really only once was needed thats 3/4 of the calls were wasted time , and when I went to school 3/4 was 75%
In which case PaulS has given you good advice.
Yes I have no doubt he had but was it the “best” advice ? If I can do it without any calls to millis() then surely that has to save even more time . I had read that Timer2 would allow this, and thats why I asked for help on the Timer2 method
As a newbie, you may want to seriously consider the advice offered by a person who is not a newbie.
I always seriously consider advice who ever gives it to me , whether they be more experienced than me or even if they are newbies, I am never too old to learn , and often even newbies have some usefull tips ,but if you are saying because I am a newbie then I should take without question the advice offered to me by those with more experience , then I am afraid you are a fool, what if the experienced person has made a mistake ? or has missunderstood my meaning ?
It was because I considered Pauls advice that I thanked him for the trouble of replying
Just to let you know I have now read and re read the info I found on Timer2 and by using and altering the examples I have managed to get a good enough grasp on how to do it by myself. My clock now counts in seconds , it makes no calls to millis() at all and has so much time between updates I can make all my calculations and could display the time 30 times over without running out of time if I so chose .
It uses the Library MsTimer2 which I found on the Arduino page
You might like to read through your post again Coding Badly, you will find that every one of your lines are nothing
but sarcasm. Are you such a little man that you need to insult newbies to make you feel bigger?. Was your post
any way to encourage a newbie to ask for help? I am old enough to have come across many arse holes like you in my life so it doesnt really phase me , but others might not be so resilient and be put off
My post to which you took umbridge had been to Pauls reply and not one that you had written. I am sure if Paul had been offended by it he is big enough to say so himself without your help .You might consider that if you have nothing usefull to say to a post that didnt concern you that you might be better saying nothing , and keep your nose
out . Perhaps if you tried thinking up usefull answers to posts rather than insulting the writer , you might one day be able to change the user name from Coding Badly to Coding a Bit Better, but some how , I doubt it