please try the following code:
# include // Include Metro library
# define METROWITHDOT 1.0 // in minutes
# define METROWITHOUTDOT 1 // in minutes
Metro metroHeartbeat = Metro(1000);
Metro metroWithDotDefine = Metro(METROWITHDOT * 60 * 1000); // works
Metro metroWithOutDotDefine = Metro(METROWITHOUTDOT * 60 * 1000); // does not work
Metro metroWithDot = Metro(1.0 * 60 * 1000); // works
Metro metroWithOutDot = Metro(1 * 60 * 1000); // does not work
Metro metro1MinuteWithDot = Metro (60000.0); // works
Metro metro1MinuteWithOutDot = Metro (60000); // works
int counter = 1;
void setup()
{
Serial.begin(9600);
}
void loop()
{
if (metroHeartbeat.check() == 1)
{
Serial.print("Heartbeat: ");
Serial.println(counter, DEC);
counter++;
}
if (metroWithDotDefine.check() == 1)
{
Serial.println("MetroWithDotDefine_____triggered");
}
if (metroWithOutDotDefine.check() == 1)
{
Serial.println("METROWITHOUTDOTDEFINE_TRIGGERED");
}
if (metroWithDot.check() == 1)
{
Serial.println("MetroWithDot___________triggered");
}
if (metroWithOutDot.check() == 1)
{
Serial.println("METROWITHOUTDOT________TRIGGERED");
}
if (metro1MinuteWithDot.check() == 1)
{
Serial.println("Metro1MinuteWithDot____triggered");
}
if (metro1MinuteWithOutDot.check() == 1)
{
Serial.println("Metro1MinuteWithOutDot_triggered");
}
}
i never see any serial printout in capital letters ;(
can you confirm?
Henning