From cf2e39f1b2d21d6ca3c9ada389d6724624711162 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Fri, 6 Sep 2019 08:47:56 -0700 Subject: [PATCH] renamed tutorial --- docs/tutorials/stop-at-object.md | 9 +++++++++ docs/tutorials/touch-sensor.md | 6 +++--- 2 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 docs/tutorials/stop-at-object.md diff --git a/docs/tutorials/stop-at-object.md b/docs/tutorials/stop-at-object.md new file mode 100644 index 00000000..6689c848 --- /dev/null +++ b/docs/tutorials/stop-at-object.md @@ -0,0 +1,9 @@ +# Stop At Object + +This is a code example to detect contact or collision with another object. It uses a touch sensor to detect hitting a wall or other obstacle. The motors are run and then stopped when the sensor is pressed. + +```blocks +motors.largeBC.tank(50, 50) +sensors.touch1.pauseUntil(ButtonEvent.Pressed) +motors.largeBC.stop() +``` \ No newline at end of file diff --git a/docs/tutorials/touch-sensor.md b/docs/tutorials/touch-sensor.md index cef9d314..0f1214bd 100644 --- a/docs/tutorials/touch-sensor.md +++ b/docs/tutorials/touch-sensor.md @@ -16,10 +16,10 @@ "url":"/tutorials/touch-sensor-values", "imageUrl":"/static/tutorials/touch-sensor-values.png" }, { - "name": "Pause Until Pressed", + "name": "Stop At Object", "description": "Waits for the sensor to be pressed before continuing the program", "cardType": "tutorial", - "url":"/tutorials/pause-until-pressed", + "url":"/tutorials/stop-at-object", "imageUrl":"/static/tutorials/pause-until-pressed.png" }] ``` @@ -28,4 +28,4 @@ [Touch to Run](/tutorials/touch-to-run), [Touch Sensor Values](/tutorials/touch-sensor-values), -[Pause Until Pressed](/tutorials/pause-until-pressed) \ No newline at end of file +[Stop At Object](/tutorials/stop-at-object) \ No newline at end of file