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

11 lines
231 B
Markdown
Raw Normal View History

2018-01-06 04:28:24 +01:00
# Traffic Lights Activity 3
```blocks
loops.forever(function () {
if (sensors.color3.light(LightIntensityMode.Reflected) < 15) {
motors.largeBC.tank(30, 12)
} else {
motors.largeBC.tank(12, 30)
}
})
```