I've cleaned up my delayMicrosecondsWithYield and added some extra testfunctions.
Unfortunaly things like F_CPU_ACTUAL and ARM_DWT_CYCCNT are considered non public, so those are removed and only...
Type: Posts; User: AlainD
I've cleaned up my delayMicrosecondsWithYield and added some extra testfunctions.
Unfortunaly things like F_CPU_ACTUAL and ARM_DWT_CYCCNT are considered non public, so those are removed and only...
A state machine is very powerful, but if the goal is to take 3-5 readings to be able to get a median of 3 or 5, it's often overkill.
Sometimes a delay for 1ms is to long and 100-200 microseconds would be enough, without the need of a very precise delay. I prefer then to have a few call's to yield().
I've seen that delayMicroseconds() doesn't call yield, not even one time.
I've made a version based on delay() that calls yield(), but I lowered the internal resolution to keep it working, aka...