Example Code for micro:bit-Mind+

Last revision 2025/12/19

Write a program using Mind (example code shown below), burn it to the Micro:bit, and observe the serial port output results.

Hardware Preparation

Software Preparation

Wiring Diagram

Connect the sensor to the P1 pin on the expansion board.

Sample Code

Result

When no pressure is detected
When pressure is detected

Additional Information

Note: The greater the force, the higher the detected value will be.

Was this article helpful?

TOP