pxt-ev3/docs/examples/happy-unhappy.md
2018-01-18 16:43:16 -08:00

300 B

Happy unhappy

Use a touch sensor to make the brick happy.

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