<div dir="ltr">I got the libraries working<div><div><img src="cid:ii_khlhs2kn0" alt="image.png" width="283" height="145"><br></div></div><div><br></div><div>I made the period in the class public because I want to set its value based on what comes back from my website.</div><div>I dont see using the getter and setter for now...</div><div>fridge11.ino does a test, slowing the blink down after 30 blinks.</div><div>All seems to work now...</div><div>you have to restart Arduino for changes in the library to be recognized.</div><div>I changed the names of the files and library so that they are all the same... ActionTimer</div><div>Thanks for your help</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Nov 16, 2020 at 8:40 PM Mark G. <<a href="mailto:vpm@palaceofretention.ca">vpm@palaceofretention.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi George,<br>
<br>
I've managed get two lights blinking at different rates<br>
on an Arduino Uno.  I changed the timer test algorithm<br>
to something I found on the internet, which made more<br>
sense to me.<br>
<br>
The code is in three separate files.  They are all in the<br>
same folder for arduino purposes.  I may try and make a<br>
library in the arduino sense, that can be used in other<br>
projects (as you desired).  Should I see if I can?<br>
<br>
Fixes: I added an #include <Arduino.h> statement into action_timer.h<br>
to solve the missing millis() problem.  Here is the example<br>
in three files.  I am using Arduino 1.8.5 on a macos 10.14<br>
system.<br>
<br>
Note: you didn't need to add the parameter in the is_action_time()<br>
member function.  It gets the period via the constructor<br>
in the call to new (also changed from previous version).<br>
<br>
<br>
On 2020-11-15 9:37 p.m., George Bowden wrote:<br>
> Here is my functions version after fixing a few bugs.  Still misses some <br>
> blinks.<br>
> On Sun, Nov 15, 2020 at 8:09 PM Mark G. <<a href="mailto:vpm@palaceofretention.ca" target="_blank">vpm@palaceofretention.ca</a> <br>
> <mailto:<a href="mailto:vpm@palaceofretention.ca" target="_blank">vpm@palaceofretention.ca</a>>> wrote:<br>
> <br>
>     Quick update:<br>
> <br>
>     You probably want to add unsigned in front of<br>
>     all the long ints, or adjust the type as needed<br>
>     (all over, including  the "const" values).<br>
> <br>
> <br>
> <br>
-- <br>
Projects mailing list<br>
<a href="mailto:Projects@vicpimakers.ca" target="_blank">Projects@vicpimakers.ca</a><br>
<a href="http://vicpimakers.ca/mailman/listinfo/projects_vicpimakers.ca" rel="noreferrer" target="_blank">http://vicpimakers.ca/mailman/listinfo/projects_vicpimakers.ca</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>George Bowden, vice president, Victoria Computer Club<br><a href="mailto:gtbowdeng@gmail.com" target="_blank">gtbowdeng@gmail.com</a></div></div></div>