Thresholds (#222)

* add threshold blocks

* updated strings

* added gap

* reorg color/gyro blocks

* fixing sound names

* adding stop block

* fixing exanmples
This commit is contained in:
Peli de Halleux
2018-01-09 12:46:48 -08:00
committed by GitHub
parent 9890f2340a
commit 892a2d585f
20 changed files with 131 additions and 69 deletions

View File

@ -14,7 +14,7 @@ function accelerate() {
}
function update() {
brick.clearScreen()
brick.printLine("speed: " + speed, 1)
brick.showString("speed: " + speed, 1)
motors.largeBC.setSpeed(speed)
}
sensors.touch2.onEvent(TouchSensorEvent.Pressed, function () {

View File

@ -7,5 +7,5 @@ loops.forever(function () {
})
motors.largeBC.setSpeed(-20);
sensors.ultrasonic4.pauseUntil(UltrasonicSensorEvent.ObjectNear);
motors.stopAllMotors();
motors.largeBC.stop();
```

View File

@ -9,5 +9,5 @@ loops.forever(function () {
})
motors.largeBC.setSpeed(-20);
sensors.ultrasonic4.pauseUntil(UltrasonicSensorEvent.ObjectNear);
motors.stopAllMotors();
motors.largeBC.stop();
```

View File

@ -4,10 +4,9 @@
let beep = false
beep = true
control.runInBackground(function () {
motors.largeB.setSpeed(-20)
motors.largeC.setSpeed(-20)
motors.largeBC.setSpeed(-20)
sensors.ultrasonic4.pauseUntil(UltrasonicSensorEvent.ObjectNear)
motors.stopAllMotors()
motors.largeBC.stop()
beep = false
})
control.runInBackground(function () {