VMM501
V. 01 – 17/01/2019
15
©Velleman nv
2.
Similarly, compile the two
on button
B/A+B
pressed
blocks to form the
complete code.
3.
When complete, we compile the programme and generate a hex. file. Click
on the download button and save the hex. file to the Downloads folder
C:\downloads. This hex. file is ready to upload to the micro:bit.
Plug the micro:bit into a USB port. The, drag and drop the hex. file onto the
micro:bit removable device to upload the programme.
Press button A to light the red LED, press button B to light the green LED, press buttons A and B
simultaneously to light the blue LED. Now, how would you realize a soft gradient RGB light?
5.6
Self-Locking Switch
1x micro:bit board
1x micro:bit breadboard adapter
1x breadboard
1x 100 Ω resistor (brown/black/brown/gold)
1x red LED (polarisation: anode (+) = long leg,
cathode (-) = short leg)
1x self-locking or bi-stable switch
We are going to read out the ambient temperature (data) of
the analogue temperature sensor and display the data to the
micro:bit.
Place the necessary components on the breadboard as shown.
Have a look at the code below.