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:
@ -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 () {
|
||||
|
@ -7,5 +7,5 @@ loops.forever(function () {
|
||||
})
|
||||
motors.largeBC.setSpeed(-20);
|
||||
sensors.ultrasonic4.pauseUntil(UltrasonicSensorEvent.ObjectNear);
|
||||
motors.stopAllMotors();
|
||||
motors.largeBC.stop();
|
||||
```
|
||||
|
@ -9,5 +9,5 @@ loops.forever(function () {
|
||||
})
|
||||
motors.largeBC.setSpeed(-20);
|
||||
sensors.ultrasonic4.pauseUntil(UltrasonicSensorEvent.ObjectNear);
|
||||
motors.stopAllMotors();
|
||||
motors.largeBC.stop();
|
||||
```
|
||||
|
@ -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 () {
|
||||
|
Reference in New Issue
Block a user