pxt-ev3/docs/examples/happy-unhappy.md
2017-11-28 16:24:22 -08:00

312 B

Happy unhappy

Use a touch sensor to make the brick happy.

sensors.touchSensor1.onEvent(TouchSensorEvent.Pressed, function () {
    brick.showImage(images.expressionsBigSmile)
})
sensors.touchSensor1.onEvent(TouchSensorEvent.Released, function () {
    brick.showImage(images.expressionsSick)
})