Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • Where your period definition ? Which hardware allow rapid communication ? C++ set a period, mean clock_time x count. You haven't any data when scanning counter on count. Use a lot delay for prepare device + communication. 9600 rate need minimal 0.3 second delay(mean 300 milisecond)(of course can use less delay value but lost a lot data !) Commented Apr 11, 2016 at 14:17
  • You could rework without interrupts. Rain doesn't exactly start and stop within a millisecond. Just test the sensor in your main loop. Commented Apr 11, 2016 at 23:45
  • arduino.cc/en/Reference/AttachInterrupt has some hints on mapping pins to interrupt numbers, if digitalPinToInterrupt(pin) doesn't work. Commented Apr 13, 2016 at 17:39