VMM502
V. 01 – 17/01/2019
17
©Velleman nv
The block
show string
can be found in the
OLED
in Code Drawer. The
digital write pin P0 to 0
block
can be found in the
Advanced
Pins
in the Code Drawer.
Since there are only two conditions, we need only one
else if
statement. When the crash sensor is
pressed, the green LED will light up. Else, if no force is applied to the crash sensor, the red LED will
blink continuously.
When complete, we compile the programme to 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 be uploaded to the
micro:bit.
Plug the micro:bit into the USB port via the micro-USB cable. Then, drag and drop the .hex-file (from
the
Downloads
folder) onto the micro:bit
Removable device
to upload the programme.
8.4
Project 4 – Plant Monitoring Device
Set up a plant monitor!
1
micro-USB cable
5
OLED
2
micro:bit
6
mini servo (not used)
3
passive buzzer
7
soil moisture sensor
4
BoB
What do I need?
1x micro:bit
1x micro-USB cable
1x BoB
1x passive buzzer
1x moisture sensor
1x OLED
2x female-female jumper wires