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*
loop()
is executed check to see if the bool has been set and if sodoStuff()
analogRead(inp)
". This alone is a no-no in an ISR: it takes about 110 µs, enough to loose incoming serial data. And also: "exp(-Td/Tdf)
". Since Tdf=Td/10, this is exp(−10) ≈ 4.5399930e-5. You should declare it as a constant, rather than repeating the (very expensive) calculation each time. Seriously: forget about interrupts and manage your timings withmicros()
instead.