From d5194b8d28e163b4c5cc90068b60d23de0dbb636 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Sat, 31 Aug 2019 06:05:36 -0700 Subject: [PATCH] More samples (#896) * coast or brake * fix title * added lesson --- docs/static/tutorials/coast-or-brake.png | Bin 0 -> 11527 bytes docs/static/tutorials/pause-until-pressed.png | Bin 0 -> 11119 bytes docs/tutorials/coast-or-brake.md | 14 ++++++++++++++ docs/tutorials/motors.md | 7 +++++++ docs/tutorials/pause-until-pressed.md | 9 +++++++++ docs/tutorials/touch-sensor.md | 9 ++++++++- 6 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 docs/static/tutorials/coast-or-brake.png create mode 100644 docs/static/tutorials/pause-until-pressed.png create mode 100644 docs/tutorials/coast-or-brake.md create mode 100644 docs/tutorials/pause-until-pressed.md diff --git a/docs/static/tutorials/coast-or-brake.png b/docs/static/tutorials/coast-or-brake.png new file mode 100644 index 0000000000000000000000000000000000000000..b5dbe19dea4df1edd9fc8595c88c0735be6052e0 GIT binary patch literal 11527 zcmc(FcRbtQ_rDqy(i%Z@P@`sJv|6Rq=8f7^1g$hhRjt}BL6O*_rHxX1wFpA3){a?P zT6@*3y|)YCJ=RN0y>g%eXrN2N=K|yg=Q$y8|g5s12 z@O>S08u;&=8+H}=IOS@nu1rzT!7&f~pte!cQKFzIiUuE|Xn@~zPc=+kDJU2kPX11{ zIDN39pb$yaR8_kB%wjny)Q_XZeRelxpwUAlMU!Ljm8D>jy+dE9rR*qvN(a5v61Dxx zvZctf-4s?<64PIt-whEq5ac(2=$)#fqvQjPvO4K=*Hg{D;MSm|4hf`CqGVMH%M__e zLQ>Iq>{cbuujH=G&p+QJp%oI9`nRfldylN$b#!|D=B3p$=X_#698X5}XV=LWIXRj$ z@yW~mDcX&*Oz=*c^m;m*Q!Ecs2BgYGL6DS7e~Q4QD`>G%`o|i7dPZ68e1H$?q=Vdl zc4)VH8WwvxR%m^m=XXKz$_Eqb=9lDVUeq5vSOOpXD#I#GcB}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T^CZ`6CQk26=#i4-y31Se|LQlyPcv? zE7)~7Pv7oD9{JQTmfn`a`APnN32>A&&AR`HkLnb~3vB`#f}1quLYv;2qFlfz=Qi2S z4DTQKC1?HeQ3Cq_?GDz*Ww_yG^InyhOgFHGy9pd|FP{5XxHz5=Fw+V1>BAsYk^S&-s_Ag`Y2szjm{r27K0CcMK6eKu(ZJI#hXhr)hA@}T(Bd^djw zxbewg)j*aGN`Zfb`(vQUsV}IZ&$|@)h*D(@I$6dt)9tq2@_SrfZ$mo&Gj_payFT%2 zM%OE?q~1^Yo=^LBT5#wdpm&MQElEqtGUE&8z_DmI3YKGjSIzxfRnp3TubKrsV&klP z4ly}=0;2LOs_b2-OvYS%=6)yJy*LxG$>^C5o_~?&#N8i!=`)bB0t-t!lBusHq*6$~5_b!1`cNgm&mF43hCJ0Q=AuA90y3jwU?#bc4U$$PZ#kL>PTC4XYN z#&~;=;+xkKs5v8cd|?=TB5(ihyq`RocXNHti7RW^u~H`_Ube=S)|`t3^koFj9cMTy-rVS8d7F8G({->Uc0Aw&p1;fVJ1i_t1K`0;v zOR#$#nhCp+sV#YRS*CJnQxp#lj0`mitoVWSy$`5r_2OCoCu0c zFbH;OlJ#Vse??xk6#;qd;30+uOJn(eORXg~3pYaNN}#V|KL|;G9{>7p5}fI@{%>`3 za#?;8>J0kbYYG4oUXwaEX^O;`VuztY51Txf4&7y($quxC)}xIjy7WsfaLxJy^vpHS zGC`YV-WGpUHXUk|j(*rAb%PAOU-6WO_8%CcfK+(yr!~v;0 z*}ST#2zS5wv;QqCw<)A>bHsh8k>>B6VkB=|dv5nQ#;`^{;K51K?OLQFfB}tZc5Eky zgB}9F?h5B5Q(v9hCh^Mj;$@J)Bn!&=3wsJE&ke{eJ=*8rKc37lM8uN- literal 0 HcmV?d00001 diff --git a/docs/static/tutorials/pause-until-pressed.png b/docs/static/tutorials/pause-until-pressed.png new file mode 100644 index 0000000000000000000000000000000000000000..144c430768a7a41b832e25750ff6d1a5da9f0244 GI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8$!`|bJ1{`MZ+@2AL0 z6F!n`{CcV8IdxfYu}pg_?}q$dQZPYNqNInjzB%eiO&O(3Z2xUS>ox<7{oi~Lcn9on zKIrKjC;OYjYWwd*nnun-{L}$(w*0%09JcPY57+Ii^e#vNFUfKkLQV8b&R=`@{{YBs BUwr@o literal 0 HcmV?d00001 diff --git a/docs/tutorials/coast-or-brake.md b/docs/tutorials/coast-or-brake.md new file mode 100644 index 00000000..145cd0e6 --- /dev/null +++ b/docs/tutorials/coast-or-brake.md @@ -0,0 +1,14 @@ +# Coast Or Brake + +```blocks +brick.buttonLeft.onEvent(ButtonEvent.Pressed, function () { + // tell motor to brake once the run command is done + motors.largeB.setBrake(true) + motors.largeB.run(100, 1, MoveUnit.Rotations) +}) +brick.buttonRight.onEvent(ButtonEvent.Pressed, function () { + // tell motor to coast once the run command is done + motors.largeB.setBrake(false) + motors.largeB.run(100, 1, MoveUnit.Rotations) +}) +``` \ No newline at end of file diff --git a/docs/tutorials/motors.md b/docs/tutorials/motors.md index 4b382eb5..e8e10d38 100644 --- a/docs/tutorials/motors.md +++ b/docs/tutorials/motors.md @@ -33,6 +33,12 @@ "cardType": "example", "url":"/tutorials/tank-zigzag", "imageUrl":"/static/tutorials/tank-zigzag.png" +}, { + "name": "Coast Or Brake", + "description": "Tell motors to coast or brake once the run command is done.", + "cardType": "example", + "url":"/tutorials/coast-or-brake", + "imageUrl":"/static/tutorials/coast-or-brake.png" }] ``` @@ -43,3 +49,4 @@ [Pivot Turn](/tutorials/pivot-turn), [Smooth Turn](/tutorials/smooth-turn), [Tank ZigZag](/tutorials/tank-zigzag), +[Coast Or Brake](/tutorials/coast-or-brake) diff --git a/docs/tutorials/pause-until-pressed.md b/docs/tutorials/pause-until-pressed.md new file mode 100644 index 00000000..54e05aa7 --- /dev/null +++ b/docs/tutorials/pause-until-pressed.md @@ -0,0 +1,9 @@ +# Pause Until Pressed + +This is an example of code using a touch sensor to detect a wall or other obstacle. The motors are running until 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 9c96deaa..39a6e2f5 100644 --- a/docs/tutorials/touch-sensor.md +++ b/docs/tutorials/touch-sensor.md @@ -10,11 +10,17 @@ "url":"/tutorials/touch-to-run", "imageUrl":"/static/tutorials/touch-to-run.png" }, { - "name": "Touch Sensor Values", + "name": "Sensor Values", "description": "Check the value of a Touch Sensor and stop a motor if pressed.", "cardType": "tutorial", "url":"/tutorials/touch-sensor-values", "imageUrl":"/static/tutorials/touch-sensor-values.png" +}, + "name": "Pause Until Pressed", + "description": "Waits for the sensor to be pressed before continuing the program", + "cardType": "tutorial", + "url":"/tutorials/pause-until-pressed", + "imageUrl":"/static/tutorials/pause-until-pressed.png" }] ``` @@ -22,3 +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