Difference: ControlOfTheDCMotor (3 vs. 4)

Revision 42017-11-24 - uli

Line: 1 to 1
 
META TOPICPARENT name="RobotSoftware"

Controlling the DC motors

Line: 6 to 6
  This table shows how the driver module is connected to the Arduino Uno:
Changed:
<
<

EN A

IN 1

IN 2

IN 3

IN 4

EN B

11

10

9

7

6

5

The following pins on the Arduino Uno are PWM pins:

The IN pins define the direction of the movement and the EN

>
>

EN A

IN 1

IN 2

IN 3

IN 4

EN B

11

10

9

7

6

5

The following pins on the Arduino Uno are PWM pins:
  3,5,6,9,11
Added:
>
>
The IN1-IN4 pins define the direction of the movement and the EN pin, which is a PWM signal, controls the speed.

Then controlling the robot through Bluetooth then the PWM pins allow me to have values between 0 and 255. However, the motors need a certain current before they start moving. Since the motor values sent through the protocol are 9 bits (10 bit ADC on the Arduino but forward and backward on a single joystick potentiometer) I shift the forward or backward value by 1 bit and I and it with 0xC0. After that I add the left/right value shifted right by 2 bits which should allow me to increase the speed of one wheel with respect to the other and thus turn left or right.

 -- Uli Raich - 2017-11-21

Comments

 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback