Microbit touch example using block editor

The pins on your Micro:bit that are labelled 0, 1 and 2 can be used as touch inputs. To do this you need to touch the ground pin with one finger and one of the 3 pins with another.  A better method of testing is to use alligator leads and connect one end to an input and the other to a metallic object such as a coin.

We will be using the Block editor here – go to https://www.microbit.co.uk/create-code and select the Microsoft block editor

Here is an image of what you will be creating

 

microbit-touch

Click on the compile button and this will generate a hex file on your computer, copy and paste this into your Microbit which if connected will show up as a drive on your computer.

Now touch the ground with one finger and the 3 pins and you should see the number displayed on the Micro:bit LEDs