From f577c61998639d199ce50d6e08a1edffb3c912ec Mon Sep 17 00:00:00 2001 From: Galen Nickel Date: Mon, 19 Mar 2018 12:26:29 -0700 Subject: [PATCH] Make corrections to coding activities (#369) * Make corrections to coding activities * Bit of format and typos --- docs/SUMMARY.md | 2 +- docs/coding.md | 6 +++--- docs/coding/autonomous-parking.md | 9 ++++----- docs/coding/line-detection.md | 27 ++++++++++++++------------- docs/coding/object-detection.md | 12 ++++++------ 5 files changed, 28 insertions(+), 28 deletions(-) diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index 182211e3..727cf8a1 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -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) diff --git a/docs/coding.md b/docs/coding.md index bf14c5dc..8180df49 100644 --- a/docs/coding.md +++ b/docs/coding.md @@ -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" diff --git a/docs/coding/autonomous-parking.md b/docs/coding/autonomous-parking.md index f715207d..fb929347 100644 --- a/docs/coding/autonomous-parking.md +++ b/docs/coding/autonomous-parking.md @@ -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. diff --git a/docs/coding/line-detection.md b/docs/coding/line-detection.md index 9d68d3a7..238abff7 100644 --- a/docs/coding/line-detection.md +++ b/docs/coding/line-detection.md @@ -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? - diff --git a/docs/coding/object-detection.md b/docs/coding/object-detection.md index c94c1422..d2f0ece5 100644 --- a/docs/coding/object-detection.md +++ b/docs/coding/object-detection.md @@ -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?