VMM501
V. 01 – 17/01/2019
14
©Velleman nv
Have a look at the code below.
1.
Drag and drop the code blocks to form the code as shown.
You can find the
on button
A
pressed
block in
Input
in the Code Drawer.
You can find the
digital write pin
P0
to
0
block in
Pins
in the Code
Drawer.
Select the A option in the
on button
A
pressed
block.
Drag 3
digital write pin
P0
to
0
blocks and insert them in the
on button
A
pressed
block.
Set pin P0 in the first
digital write pin
P0
to
0
block, and set value 0 to 1
(red LED on).
Set pin P1 in the second
digital write pin
P0
to
0
block, and set value to
0 (green LED off).
Set pin P2 in the third
digital write pin
P0
to
0
block, and set value to 0
(blue LED off).