title | layout | meta-description | simple-description | share | comments | author | strapline | aboutbox | cats | date | date-updated |
---|---|---|---|---|---|---|---|---|---|---|---|
Press the Button |
text-width-sidebar |
How to use buttons and if conditions on the micro:bit in Python. |
Microbit Buttons |
true |
true |
jez |
Use the buttons to make a message |
Using the buttons on the front of the microbit to display a message |
medium |
2016-12-23 10:20:00 UTC |
2016-12-23 10:20:00 UTC |
{% highlight python %} {% include_relative code/press-the-button.py %} {% endhighlight %}
{: .ui .dividing .header}
The micro:bit api lists other images that can be drawn on the display. The Image
class predefined images which can be used with display.show()
:
display.show(Image.HAPPY)
- Image.HEART
- Image.HEART_SMALL
- Image.HAPPY
- Image.SILLY
There is a full list on the API. Or use the display
module and display a picture.