I'm experiencing some intermittent problem with my Zuno. Sometimes Zuno stops reporting my sensor values.
I'm powering the Zuno via USB (output 1A).
I have started to wonder if the problem has something to do with interrupts...
I have an IR-sensor that counts the LED-blinks on my power-meter. This is to calculate the watt and kwh my house is using.
Every time the power-meter LED blinks the interrupt callback function is called:
Code: Select all
ZUNO_SETUP_ISR_INT0(onPulse);
Code: Select all
void setup()
{
// Enable interrupt. Triggered when light pulse is detected
zunoExtIntMode(ZUNO_EXT_INT0, RISING);
}
Can the interrupt cause any trouble for my main -loop?
Code: Select all
void loop()
{
zunoSendReport(ZUNO_CHANNEL_NUMBER_ONE); // send report over the Z-Wave to the controller
zunoSendReport(ZUNO_CHANNEL_NUMBER_TWO); // send report over the Z-Wave to the controller
delay(60000); //sleep 60s
}
Thanks!
/S