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

10 lines
248 B
Markdown
Raw Permalink Normal View History

2018-01-06 04:28:24 +01:00
# Traffic Lights Activity 2
```blocks
sensors.color3.onColorDetected(ColorSensorColor.Red, function () {
motors.largeBC.tank(0, 0)
})
sensors.color3.onColorDetected(ColorSensorColor.Green, function () {
motors.largeBC.tank(20, 20)
})
```