I am trying to read the numeric Input without updating the figure. Currently works, if I press the +/- in the blynk app I can then get the data. However on power loss I would want to look at the numeric input and update variables without having to go into the app and press +/-
Any help would be appreciated
void loop()
{
Blynk.run();
timer.run();
// Enable the interrupt again now that we've finished sending output
attachInterrupt(sensorInterrupt, pulseCounter, FALLING);
}
BLYNK_WRITE(2)
{
blynkflowingvalue = param.asInt(); // Get value as integer
}
BLYNK_WRITE(3)
{
blynknoflowvalue = param.asInt(); // Get value as integer
}
I have the attachInterrupt because I turn it off at the start of some functions. I guess I could then turn it back on at the end of the functions and keep it out of the loop
You should define (attach) the interrupt once, in void setup.
You can then use noInterrupts() and interrupts() to temporarily disable then re-enable interrupts whilst performing certain tasks.