Make corrections to coding activities (#369)

* Make corrections to coding activities

* Bit of format and typos
This commit is contained in:
Galen Nickel 2018-03-19 12:26:29 -07:00 committed by Peli de Halleux
parent 06f66571cf
commit f577c61998
5 changed files with 28 additions and 28 deletions

View File

@ -9,7 +9,7 @@
* [Coding](/coding)
* [Autonomous Parking](/coding/autonomous-parking)
* [Object Detection](/coding/object-detection)
* [Line Following](/coding/line-following)
* [Line Detection](/coding/line-detection)
* [Design Engineering](/design-engineering)
* [Make It Move Without Wheels](/design-engineering/make-it-move)

View File

@ -13,13 +13,13 @@
"cardType": "side"
}, {
"name": "Object Detection",
"description": "TBD",
"description": "Design ways to avoid accidents between vehicles and objects",
"url":"/coding/object-detection",
"imageUrl": "/static/lessons/object-detection.jpg",
"cardType": "side"
}, {
"name": "Line Following",
"description": "TBD",
"name": "Line Detection",
"description": "Improve driving safety by helping drivers stay on course",
"url":"/coding/line-detection",
"imageUrl": "/static/lessons/line-detection.jpg",
"cardType": "side"

View File

@ -16,12 +16,11 @@ Design cars that can park themselves safely without driver intervention.
### Build
Build a LEGO MINDSTORMS vehicle that can park itself safely without driver intervention.
Start by constructing this [model](https://le-www-live-s.legocdn.com/sc/media/lessons/mindstorms-ev3/building-instructions/ev3-rem-driving-base-79bebfc16bd491186ea9c9069842155e.pdf).
Build a LEGO MINDSTORMS vehicle that can park itself safely without driver intervention. Start by constructing this model:
![EV3- Robot Driving Base](/static/coding/autonomous-parking/ev3-robot-driving-base.jpg)
[![EV3- Robot Driving Base](/static/coding/autonomous-parking/ev3-robot-driving-base.jpg)](https://le-www-live-s.legocdn.com/sc/media/lessons/mindstorms-ev3/building-instructions/ev3-rem-driving-base-79bebfc16bd491186ea9c9069842155e.pdf)
### Checks
### Check
Before you program, check:
@ -65,6 +64,7 @@ brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
loops.pause(3000)
})
```
### Download and test
Click Download and follow the instructions to get your code onto your EV3 Brick. Press the center button on the EV3 Brick to run the program.
@ -160,7 +160,6 @@ Click Download and follow the instructions to get your code onto your EV3 Brick.
* Is there a more efficient way to build your program?
* How can your program be used in real-world scenarios?
## Continue
* Click on the JavaScript tab and experiment with changing the values in the code.

View File

@ -16,15 +16,15 @@ Think about:
### Build
Build a LEGO MINDSTORMS vehicle that can help prevent drivers from falling asleep and causing an accident.
Build a LEGO MINDSTORMS vehicle that can help prevent drivers from falling asleep and causing an accident. Start by constructing this model:
Start by constructing this [model](https://le-www-live-s.legocdn.com/sc/media/lessons/mindstorms-ev3/building-instructions/ev3-rem-color-sensor-down-driving-base-d30ed30610c3d6647d56e17bc64cf6e2.pdf):
[![EV3 robot with color sensor](/static/coding/line-detection/ev3-robot-color-sensor-down.jpg)](https://le-www-live-s.legocdn.com/sc/media/lessons/mindstorms-ev3/building-instructions/ev3-rem-color-sensor-down-driving-base-d30ed30610c3d6647d56e17bc64cf6e2.pdf)
![EV3 robot with color sensor](/static/coding/line-detection/ev3-robot-color-sensor-down.jpg)
Build red and green “lights” for your robot to detect. You can use LEGO bricks, colored tape, or marker on white paper. Building instructions:
Build red and green “lights” for your robot to detect. You can use LEGO bricks, colored tape, or marker on white paper. Read the building [instructions](https://le-www-live-s.legocdn.com/sc/media/files/support/mindstorms%20ev3/building-instructions/design%20engineering%20projects/color%20squares-0a88dfd98bb2e64b5b8151fc422bae36.pdf).
[![IMAGE: Color Squares](/static/coding/line-detection/ev3-color-squares.jpg)](https://le-www-live-s.legocdn.com/sc/media/files/support/mindstorms%20ev3/building-instructions/design%20engineering%20projects/color%20squares-0a88dfd98bb2e64b5b8151fc422bae36.pdf)
![IMAGE: Color Squares](/static/coding/line-detection/ev3-color-squares.jpg)
### Check
Before you program, check:
@ -33,7 +33,7 @@ Before you program, check:
* Are the wheels rotating freely?
* Are the wires connected from the Color Sensor to port 3?
![IMAGE: EV3 Driving Base](/static/coding/line-detection/ev3-robot-driving-base.jpg)
![EV3 Driving Base](/static/coding/line-detection/ev3-robot-driving-base.jpg)
### Program
@ -126,7 +126,7 @@ music.playSoundEffect(sounds.systemGeneralAlert)
1. Start motors ``B`` and ``C`` (drive forward with a curve toward the line).
2. Wait for the color sensor to detect the color black.
3. Play sound effect “System General Alert.”
3. Play sound effect ``system general alert``.
4. Start motors ``B`` and ``C`` (drive forward with a curve away from the line).
5. Wait for the color sensor to detect the color white.
6. Loop forever.
@ -141,11 +141,11 @@ loops.forever(function () {
})
```
### Download and test
#### Download and test
Click **Download** and follow the instructions to get your code onto your EV3 Brick.
### Differentiation
#### Differentiation
Program your robot to drive on “autopilot” along a given route. You will need to create a program that recognizes and responds to a dark line (or white line). You will create a line-following program and your robot will need to travel along the line without losing contact with it.
@ -167,14 +167,16 @@ motors.largeBC.steer(0, 50)
```block
if (true) {
} else {
}
```
### ~
### Sample Solutions
### Sample Solutions - Line Following in Loop
#### Line Following in Loop
#### Method 1
1. While the Color Sensor detects the color black, start motors ``B`` and ``C`` (drive forward with a curve toward the line).
2. While the Color Sensor detects the color white, start motors ``B`` and ``C`` (drive forward with a curve away from the line).
@ -193,7 +195,7 @@ forever(function () {
})
```
#### Line Following in Loop
#### Method 2
1. If the Color Sensor detects the color black, start motors ``B`` and ``C`` (drive forward with a curve toward the line).
Else the Color Sensor detects the color white, start motors ``B`` and ``C`` (drive forward with a curve away from the line).
@ -235,4 +237,3 @@ Personalize:
* Add a team photograph!
Congratulations! What will you design next?

View File

@ -16,15 +16,15 @@ Think about:
### Build
Build a LEGO MINDSTORMS vehicle that can avoid accidents between vehicles and objects in the road.
Build a LEGO MINDSTORMS vehicle that can avoid accidents between vehicles and objects in the road. Start by constructing this model:
Start by constructing this [model](https://le-www-live-s.legocdn.com/sc/media/lessons/mindstorms-ev3/building-instructions/ev3-ultrasonic-sensor-driving-base-61ffdfa461aee2470b8ddbeab16e2070.pdf).
[![EV3 Robot Driving Base](/static/coding/object-detection/ev3-robot-driving-base.jpg)](https://le-www-live-s.legocdn.com/sc/media/lessons/mindstorms-ev3/building-instructions/ev3-ultrasonic-sensor-driving-base-61ffdfa461aee2470b8ddbeab16e2070.pdf)
![EV3 Robot Driving Base](/static/coding/object-detection/ev3-robot-driving-base.jpg)
Build an obstacle for your robot to detect. You can build the **cuboid model** out of LEGO bricks or an obstacle of your choice.
Build an obstacle for your robot to detect. You can build the [cuboid model](https://le-www-live-s.legocdn.com/sc/media/lessons/mindstorms-ev3/building-instructions/ev3-cuboid-dc93b2e60bed2981e76b3bac9ea04558.pdf) out of LEGO bricks or an obstacle of your choice.
[![Cubiod block](/static/coding/object-detection/ev3-cuboid.jpg)](https://le-www-live-s.legocdn.com/sc/media/lessons/mindstorms-ev3/building-instructions/ev3-cuboid-dc93b2e60bed2981e76b3bac9ea04558.pdf)
![Cubiod block](/static/coding/object-detection/ev3-cuboid.jpg)
### Check
Before you program, check:
@ -134,4 +134,4 @@ Click **Download** and follow the instructions to get your code onto your EV3 Br
* Include an image of your program with comments.
* Add a team photograph!
Congratulations! What will you design next
Congratulations! What will you design next?