Edits for 'RC car' project. (#522)

* Edits for 'RC car' project.

* Line spacing below video frame.
This commit is contained in:
Galen Nickel
2017-08-29 15:47:09 -07:00
committed by Peli de Halleux
parent 743979b9ea
commit 01f665b268
5 changed files with 56 additions and 56 deletions

View File

@ -2,21 +2,20 @@
## Step 1: Add the Kitronik package
Kitronik published a set of blocks to use their motor driver. We need to add it to our project.
Kitronik has a package with blocks that program their motor driver. We need to add it to our project.
* Click on **Advanced**
* Click **Add Package**
* Type ``kitronik``, press **Enter**
* Select the **kitronik-motor-driver** package
After the package gets loaded, you should see a new **Kitronik" category in the toolbox.
After the package is loaded, you should see a new **Kitronik** category in the toolbox.
## Step 2: Round and round we go!
https://youtu.be/pD6tM1nXCPA
The first program will have the car drive in a circle for 5 seconds when the user presses button ``A``.
This is simply done by turning both motor controllers on for 5 seconds.
The first program has the car drive around in a circle for 5 seconds when the user presses the ``A`` button. This is simply done by turning both motor controllers on for 5 seconds.
```blocks-ignore
input.onButtonPressed(Button.A, () => {
@ -32,18 +31,19 @@ input.onButtonPressed(Button.A, () => {
### ~ hint
Make sure to unplug the @boardname@ from the Edge connector while your are connecting it to your computer to avoid any kind of electrical problem.
**Protect your electronics**
Make sure to unplug the @boardname@ from the edge connector when you're connecting it to your computer. This helps protect everything from potential electrical problems.
### ~
Depending on how you've connected your cables to the motor driver, your car may be going backward instead of forward.
You can either swap the cables or change your code to account for that.
Depending on how your wires are connected to the motor driver, your car may go backward instead of forward. If so, you can either swap the wires or change the ``MotorDirection`` in your code to get it to go the right way.
## Step 3: Figure Eight
## Step 3: Figure eight
https://youtu.be/agor9wtiAkE
Instead of stopping after 5 seconds, we reverse the steering motor to turn the other direction. This will create a figure eight trajectory.
Instead of stopping after 5 seconds, we reverse the steering motor to turn in the other direction. This will create a figure eight path.
```blocks-ignore
input.onButtonPressed(Button.A, () => {
@ -59,7 +59,7 @@ input.onButtonPressed(Button.A, () => {
})
```
Great! It's now time to use another @boardname@ to remove control the car.
Great! The code to drive the car is done! Now let's get another @boardname@ and control the car remotely.
### ~button /projects/rc-car/connect