Skip to main content

Touch Logo

Back to article list

Touch Logo

The micro:bit’s touch-sensitive logo can detect when it is touched, pressed, released, or long-pressed. You can use these actions to control your programs.

### Sample Code
<iframe src="https://makecode.microbit.org/_UaCj25Do9DEc" width="1000" height="600" frameborder="0"></iframe>

Result: Press button A on the micro:bit, and it should display a happy face icon. Press button B, and it should display a sad face icon. Press the micro:bit logo, and it should display a surprised face icon.