copy and paste the script below into your Sgneep-Box.
- enter the sgneep-box terminal.
- insert the command 'edit script'
- Paste and save the script in the opened text editor.
- wait 5 seconds, the script will start automatically.
- or use 'load script' command in Sgneep-Box terminal.
This simple script turns your raspberry pi into an electronic timer chrono using the power of the 40-pin GPIO.
#electronic timer demo
#change background
ds_background back2.jpg
#define relay function ( GPIO pin 15 )
make_sub relay_on
sub relay_on IOT_out 15 on
make_sub relay_off
sub relay_off IOT_out 15 off
#set electronic timer
timed_sub ALL 17:40 18:00 relay_on
timed_sub ALL 18:00 18:30 relay_off
timed_sub ALL 18:30 18:45 relay_on
timed_sub ALL 18:45 00:00 relay_off
timed_sub ALL 00:00 17:40 relay_off
end_script
#--------------------------------------