View: 1869|Reply: 7

Picar-B Auto Avoidance Youtube video

[Copy link]

1

Threads

5

Posts

25

Credits

Newbie

Rank: 1

Credits
25
Post time 2020-7-25 05:38:27 | Show all posts |Read mode
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!


Reply

Use magic Report

1

Threads

5

Posts

25

Credits

Newbie

Rank: 1

Credits
25
 Author| Post time 2020-7-27 03:35:24 | Show all posts
Hi There

Any help with this please Adeept?

I'd really like to get this going asap. There appears to be a problem with the code, even though it looked like it worked perfectly in your video!

Thanks.
Reply

Use magic Report

1

Threads

49

Posts

150

Credits

Registered member

Rank: 2

Credits
150
Post time 2020-7-30 17:17:27 | Show all posts
You need to add GPIO.setup(Motor_B_Pin1, GPIO.OUT) before the GPIO.output(Motor_B_Pin1, GPIO.LOW) function.
Reply

Use magic Report

1

Threads

5

Posts

25

Credits

Newbie

Rank: 1

Credits
25
 Author| Post time 2020-8-3 05:55:52 | Show all posts
Hi there.

Thanks for your reply. However, the entry you suggest is already in the code in the motor initialisation section. If the code needs to be placed elsewhere too then please advise. Even better still, could you supply a fully working version of the code please?

Thanks.
Reply

Use magic Report

1

Threads

5

Posts

25

Credits

Newbie

Rank: 1

Credits
25
 Author| Post time 2020-8-6 04:22:23 | Show all posts
Any other ideas please??
Reply

Use magic Report

1

Threads

5

Posts

25

Credits

Newbie

Rank: 1

Credits
25
 Author| Post time 2020-10-18 05:14:44 | Show all posts
I still haven't received a reply since my last post in August. Please Adeept, can you supply working code for the auto avoidance please? The existing code clearly doesn't work properly. Thanks.
Reply

Use magic Report

23

Threads

223

Posts

814

Credits

Senior member

Rank: 4

Credits
814
Post time 2021-2-5 15:03:09 | Show all posts

Please refer to the latest manuals and materials: https://www.adeept.com/learn/detail-33.html
If your problem is not resolved, please provide us with a detailed report (including product model, error report, pictures, etc.): support@adeept.com

Reply

Use magic Report

23

Threads

223

Posts

814

Credits

Senior member

Rank: 4

Credits
814
Post time 2021-2-5 15:03:29 | Show all posts
1595626149 replied at 2020-10-18 05:14 AM
I still haven't received a reply since my last post in August. Please Adeept, can you supply working ...

Please refer to the latest manuals and materials: https://www.adeept.com/learn/detail-33.html
If your problem is not resolved, please provide us with a detailed report (including product model, error report, pictures, etc.): support@adeept.com

Reply

Use magic Report

You have to log in before you can reply Login | Sign Up

Points Rules