simplify motor API

This commit is contained in:
Peli de Halleux
2017-10-27 01:47:25 -07:00
parent 12cdad72c8
commit 712c2178d2
4 changed files with 42 additions and 79 deletions

View File

@ -4,8 +4,14 @@ Use this program with the Programmable Brick and Large Motor.
```blocks
loops.forever(function () {
output.largeMotorA.onForAngle(30, 30, false)
output.largeMotorA.setPower(30)
output.largeMotorA.on(true)
loops.pause(100)
output.largeMotorA.on(false)
music.playSoundUntilDone(music.sounds(Sounds.PowerUp))
output.largeMotorA.onForAngle(40, -30, false)
output.largeMotorA.setPower(-30)
output.largeMotorA.on(true)
loops.pause(100)
output.largeMotorA.on(false)
})
```