micro:bit - pin touches
This page is mainly about micro:bit - pin touches
The micro:bit has 25 pins on the 'edge connector' which you can use to connect to external devices. The large pins (or pads) are useful for connecting crocodile clips to or will respond when you touch them. You will have to touch the 'GND' pin at the same time for the micro:bit to detect the touch.
BL / JS / PY : Write a script which displays a number 0, 1 or 2 depending on which of the large pins / pads you touch on the edge connector of the microbit.
BL / JS / PY : The number stays on the display. Extend your script so that the micro:bit clears the display after 1s.
BL / JS / PY : Using three separate variables, pin_0, pin_1 and pin_2, keep track of how many touches each pin has had and display the number of touches on the display rather than the pin number you touched.
(microbit-pin-touch)
(microbit-pin-touch-clear)
(microbit-pin-touch-variables)
Last modified: October 5th, 2021