View: 243|Reply: 3

Reversed Servo for the wheels

[Copy link]

2

Threads

3

Posts

12

Credits

Newbie

Rank: 1

Credits
12
Post time 2019-7-14 03:14:48 | Show all posts |Read mode
Hi,

In our PiCar-A set, I found that the wheels react at opposite directions when instructed and in auto mode as well.  The camera is working correctly.  How to change the code to only reverse the wheel part?

Thanks!
Reply

Use magic Report

1

Threads

10

Posts

23

Credits

Newbie

Rank: 1

Credits
23
Post time 2020-2-13 05:06:35 From the mobile phone | Show all posts
Ho, do You nave fix the bug? I have opposite directions in servo and in motor.
Reply

Use magic Report

0

Threads

2

Posts

14

Credits

Newbie

Rank: 1

Credits
14
Post time 2020-3-8 22:38:13 | Show all posts
I have the same problem, would appreciate a pointer.  In the directions it highlights to ensure that the motor installation is correctly orientated, but I see no markings indicating tthe motors are side specific.  This issue also prevents the object tracking from working correctly so it isn't just an issue with the GUI client.
Reply

Use magic Report

0

Threads

2

Posts

14

Credits

Newbie

Rank: 1

Credits
14
Post time 2020-3-10 00:20:50 | Show all posts
Posting what worked for me......Note that the pictures in the manual show the tops of the motors with a D shape, with the flat side against the chassis.  This allows for the correct motor orientation with the correct PIN connections, but is impossible to align as there is a protrusion on that side which prevents the motor from mounting flush.  Counter-intuitively, that orientation also exposes the motor wires to the wheels......

Mounting the motors with the flat of the D towards the exterior, allows flush mounting with the wires protected from the wheels, but reverses the movement directions (forward/back, right/left).  These can be corrected in the move.py file by swapping the 1/0 values to the opposite values from the stock code:

  1. left_forward  = 1
  2. left_backward = 0

  3. right_forward = 0
  4. right_backward= 1
Copy the Code
Reply

Use magic Report

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

Points Rules