Have a look at the code below.
1.
First, we make two variables. Go to
on
Enter
click Ok.
You will see two new variables under
We will need these variables later to save the data in a register.
You can find the
in
minus
block in
Basic
Variables
PhoVal.
2.
Select the
V. 01 – 17/01/2019
Make a
Variable.
CalVal
in the window and click Ok. Enter
logic smaller than function
Logic
in the Code Drawer. You can find the
block in
Math
in the Code Drawer. You can find the
Basic
in the Code Drawer. You can find the
More
in the Code Drawer. You can find the
in the Code Drawer. Click on the arrow and select
CalVal
variable and set the
VMM501
Variables
in the Code Drawer and click
PhoVal
Variables
in the Code Drawer.
and the
mathematical function
analog read pin
11
in the window and
if then else
blocks
show icon
clear screen
block in
set item to
0 block in
CalVal
or
to P0.
©Velleman nv