I am using these items to control a line following robot:
- Raspberry Pi 3 B V1.2
- Adafruit DC Stepper Motor Hat
- Two GrovePi IR Sensors whose outputs are wired directly to GPIO pins setup as inputs
(Volrage from IR Sensors divided down to 3.3V max).
- GrovePi v1.0
I have an if-then-else loop to monitor the input from the IR sensors via the GPIO’s and decide which motors should run to stay on the line. At this point the GrovePi is not attached.
The Robot works fine and follows curved lines and 90 degree turns at a decent speed. I have noted that its takes about 100 milliseconds to iterate through each loop.
However when I add a GrovePI board, even without sensors attached, the loop slows way down and now takes about 300 milliseconds to execute. This makes the robot reaction times very slow and requires slowing down the motor speed dramatically in order for the robot to follow a line.
I would like to get the robot working with the GrovePi in order to add additional sensors and functionality to the robot.
Any insight into why the GrovePi might be slowing down the Raspberry Pi and what do about it would be greatly appreciated.