cruise control activities

This commit is contained in:
Peli de Halleux
2018-01-05 21:49:04 -08:00
parent 81f406c6cc
commit 485f02ed27
4 changed files with 74 additions and 0 deletions

View File

@ -0,0 +1,10 @@
# Cruise Control Activity 1
```blocks
let speed = 0;
sensors.touch1.onEvent(TouchSensorEvent.Pressed, function () {
if (speed < 100)
speed = speed + 10;
motors.largeBC.setSpeed(speed);
})
```