Hello Everyone (and Hopefully Paul)
I tried the elapsedMills data type in the code below and it doesn't work. I'm using the teensy++2.0.
Any ideas what's happening?
Rudy
I tried the elapsedMills data type in the code below and it doesn't work. I'm using the teensy++2.0.
Any ideas what's happening?
Code:
//code starts here
// create elapsedMillis outside loop(), to
// retain its value each time loop() runs.
elapsedMillis sinceTest1;
elapsedMillis sinceTest2;
elapsedMillis sinceTest3;
void setup
{
Serial.begin(9600);
}
void loop() {
if (sinceTest1 >= 1000) {
sinceTest1 = sinceTest1 - 1000;
Serial.println("Test1 (1 sec)");
}
if (sinceTest2 >= 2700) {
sinceTest2 = sinceTest2 - 2700;
Serial.println(" Test2 (2.7 sec)");
}
if (sinceTest3 >= 1300) {
sinceTest3 = sinceTest3 - 1300;
Serial.println(" Test3 (1.3 sec)");
}
}
Rudy