You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#24: fix differential drive documentation + slides and flywheel control examples
* Update Differential Drive Documentation
* Fix goal setting in Java portion of example usage of Slides
* Fix goal setting method in Flywheels for the java portions
* fixed java parts of setting motor power in flywheels section
* fixed java parts for setting power in slides
* fix kotlin syntax for initialization and setting motor power in slides
* fix kotlin syntax for motor initialization and setting motor power
> For a differential drive, there are two types of drive systems. You can use the tank and arcade control schemes with a differential drive.
8
8
>
9
-
> Arcade drive use a y-value input from the controller and a value from the turn stick. We know that when the turn stick is pushed left, the right side should move forward and the left side should move backwards. Therefore, since pushing the turn stick to the left returns a negative value, it should be added to the left speed and subtracted from the right speed.
9
+
> Arcade drive uses a y-value input from the controller and a value from the turn stick. We know that when the turn stick is pushed left, the right side should move forward and the left side should move backwards. Therefore, since pushing the turn stick to the left returns a negative value, it should be added to the left speed and subtracted from the right speed.
10
10
>
11
11
> Tank drive uses a y-value input from the left and right sticks. The sticks control their respective side of the robot.
12
12
13
13
## Usage
14
14
15
-
First, you need to create your motors. Let's create variables for their names:
15
+
First, you need to create your motors. Let's create variables for them:
16
16
17
17
:::tabs key:code
18
18
== Kotlin
19
19
20
20
```kotlin
21
-
val frontLeftName ="front_left"
22
-
val frontRightName ="front_right"
23
-
val backLeftName ="back_left"
24
-
val backRightname ="back_right"
25
-
```
26
-
27
-
== Java
28
-
29
-
```java
30
-
publicString frontLeftName ="front_left";
31
-
publicString frontRightName ="front_right";
32
-
publicString backLeftName ="back_left";
33
-
publicString backRightName ="back_right";
34
-
```
35
-
36
-
:::
37
-
38
-
Next, we'll create variables for the motors and motor groups for each of the sides. If you only have one motor each side, you can skip creating the motor groups.
0 commit comments