Have a look at the code below.
1.
Drag and drop the code blocks to form the code as shown.
You can find the
can find the
read pin
mathematical function minus
You can find the
2.
First, we make two variables. Go to
on
Enter
Ok.
You will see two new variables under
We will need these variables later to save the data in a register.
Drag and drop the
vol
Next, we drag and drop the
block over the 0 next to the
V. 01 – 17/01/2019
set item to
map/from low/from high/to low/to high
blocks in
Pins
in the Code Drawer. You can find the
show number
Make a
Variable.
vol
in the window and click Ok. Enter
set item to
option via the arrow.
VMM501
block in
Variables
in the Code Drawer. You
and
divide
in
Math
block in
Basic
in the Code Drawer.
Variables
in the Code Drawer and click
tem
in the window and click
Variables
in the Code Drawer.
block in the
forever
map/from low/from high/to low/to high
set item to
block.
17
and
analog
in the Code Drawer.
block and select the
©Velleman nv