IOT_object (id_name) (type) (BCM-pin) (S/loop) (resistor)
id_name = name of the object
type = dht11 (temperature sensor)
dht22 (temperature sensor)
in (pushbutton
BCM-pin = raspberry GPIO
S/Loop = pause for the next loop
resistor = value 'pull_up' and 'pull_down' or 'null'
Set object, dht11, dht22, asr01 and input button connected in GPIO BCM-pin
Copy and paste the script in Sgneep-Box Script:
# Define sound-bell
make_sub soundbell
sub soundbell ds_mp3_load bell.mp3
# -------- ... -------
# Push button with pull-up resistor enabled
IOT_object push_btn in 23 5 pull_up
IOT_check push_btn in equal 1 CALL sound_bell