|
Hi There
I watched the YouTube video on the automatic obstacle avoidance. I decided to reproduce the code that was shown in the video.
I had a couple of hiccups, as follows.
1. I had to install the Adafruit_PCA9685 module as the program couldn't find it when I ran it.
2. I have received an 'Index out of range' error relating to line 60, which is scanList[0]. I notice that line 50 has scanList[], so I assume that I am receiving this error because the list is currently empty? Any ideas on how to resolve please? I have temporarily changed line 50 to read 'scanList[0, 1, 2]. This allows execution further through the code, but not sure if it's right or not.
3. I receive the following error when running the program again.
[0.51, 1, 2]
Traceback (most recent call last):
File "automatic.py", line 105, in <module>
move.motor_left(1, 0, 80)
File "/home/pi/test/move.py", line 74, in motor_left
GPIO.output(Motor_B_Pin1, GPIO.LOW)
RuntimeError: The GPIO channel has not been set up as an OUTPUT
Any ideas would be gratefully received - thanks!
|
|