pxt-ev3/docs/examples/happy-unhappy.md
Peli de Halleux ea956f1a73
Buttons rename (#287)
* renaming up/down/click to released/pressed/bump

* missing images

* fixing signature issue

* updated strings

* white lego logo
2018-01-31 08:28:00 -08:00

290 B

Happy unhappy

Use a touch sensor to make the brick happy.

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