Getting Started
Pre-coding:
Get hold of a Micro:bit Tinker Kit
Download the Mu editor
Before each project, write “from microbit import * ”
LED
Let the LED be connected to pin0CommandUsagepin0.read_digital()Check if LED is lighted or not
pin0.read_digital() = 0 # means LED is not lighted
pin0.read_digital() = 1 # means LED is lightedpin0.write_digital(value)Turn LED on or off
pin0.write_digital(1) # lights LED
pin0.write_digital(0) # turns LED off