pxt-ev3/docs/coding/traffic-lights-1.md

9 lines
232 B
Markdown
Raw Permalink Normal View History

2018-01-06 04:28:24 +01:00
# Traffic Lights Activity 1
```blocks
brick.buttonEnter.onEvent(ButtonEvent.Bumped, function () {
2018-01-06 04:28:24 +01:00
motors.largeBC.tank(20, 20)
sensors.color3.pauseUntilColorDetected(ColorSensorColor.Red)
2018-01-06 04:28:24 +01:00
motors.largeBC.tank(0, 0)
})
```