hi to all,
this is my loop: (tiny84 8MHz)
{
Sleepy::loseSomeTime(10000); // 10 sec, sleep
g_currentMillis = millis();
mySerial.println(g_currentMillis);
}
this is the ISR of my pin_change interrupt:
void ISR_wakeup_fototransistor()
{
if(digitalRead(opto_PIN)==1) g_flg_lampeggio=1;
}
when interrupts occurs rapidly the millis() are unpredictable ( increments few SECONDS each interrupts)
this works well if NO INTERRUPTS occours.
Any idea ???
thanks in advance
best regards to all.
Mauro IK1WVQ