TXT
Smart Home
ROBOTICS
21
Robotics Sensor Station IoT
Project 1
Create a program that continuously measures the noise level. At
a certain volume of 55 decibels, the green light illuminates. At a
volume of 65 decibels, the yellow light illuminates. And at a
volume of 75 decibels, the red light illuminates.
You will use a “subroutine” for the first time in this program. You
can create the subroutine by clicking on the command “Create new
subroutine”.
In the same manner that every main program starts with a green walk
signal, a subroutine also starts with a corresponding command.
ROBO
Pro Help 8.3.1 and 8.3.2
The “subroutine” block comprises two additional commands. These
serve to read information in to and out of the subroutine
ROBO Pro Help
8.3.3 and 8.3.4
.
First insert the subroutine input into the function window.
Then insert a new command “Off”
ROBO Pro Help 8.5.8
. from
the “Commands” block. You will need it 3 times (3 lamps).
Dock one output command on each of the orange colored
outputs. Right-click on the context menu to change the
names to “01 – 03”.
To evaluate 3 acoustic values, you need the next
command, “Compare” from the “Branch, Wait ...” block
ROBO Pro Help 8.3
.
You will need to dock a input command from the
“subroutine” block on each of the two inputs. Change
the inputs for the first comparison command to “W” and
“S1” using the context menu. Connect each of the other
two comparison commands to input “A”. Change the two
“B inputs” to “S2 and S3”. Then connect the “<” output
Generate new
subroutine