CPU slow when encoder motor running at same time as distance sensor


#1

Example here - if I comment out the " Serial.println(ultraSensor.distanceCm());" line, everything is fast.
Why would the distance sensor slow things down so much?

When watching the serial output the loops are working very fast. As soon as one of the motors is running the loop/serial output starts to become very slow.

https://pastebin.com/QeVjfFuB


#2

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.