How to reset the count/data after HTTP.POST? I have a project that records interrupts from a reed switch to nodemcu.
It records like this: 0.3,0.6,0.9,1.2 Then what I want to happen is to go back to zero when it successfully HTTP.POST to a webserver.
How can I do it? Thanks!
volatile float rainrate = 0.3;
volatile float total;

void count {
  total += rainrate;
}
Try putting your total variable to 0, like this:
total = 0;
It should work like this.