Set Loop

Per dichiarare le funzioni che verranno eseguite in Sgneep-Box, usiamo il comando make_sub e sub


if (VAR) (OPERATOR) (VALUE) call (MAKESUB_ID)

Call a sub process based on certain conditions, depending on the value of an expression.

Operator :

== EQUAL

!= NOT EQUAL

> GREATER

< LOWER


Example


make_sub motor1 sub motor1 IOT_out # subroutine function:
set_var myvar=30
if myvar > 30 call motor1_on
# set loop
loop myloop 30 call myimg
# wait 10 min.
sleep 600
# close loop
close_loop
#...
Powered by Sgneep.com