I am using these items to control a line following robot:
1. Raspberry Pi 3 B V1.2
2. Adafruit DC Stepper Motor Hat
3. Two GrovePi IR Sensors whose outputs are wired directly to GPIO pins setup as inputs (Volatge from IR Sensors divided down to 3.3V max).
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.
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 milleseconds 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 Raspberrry Pi and what do about it would be greatly appreciated.