Programming the SIB™
Introduction SiB™ vs SID mode Programs in SiB™ mode Programs in SID mode Sample Programs - Door Bell - Emergency Button - Freezer Monitor - I Love You - Lights Demo - Magnetic Alarm - Motion Sensor - Sweet Dreams - Thermometer - Water/Moisture Sensor - Yes or No Commands A - Z Configuration GPIO Programming Time Sensor Messaging | Sample Programs: Freezer Monitor The Freezer app wakes on a 20 minute timer and checks the temperature of the freezer. If the freezer is too warm, a notification is sent to you. The SiB will continue sending notifications as long as the temperature continues to get warmer. Once the temperature is stable, or receding, the notifications stop. The app also sends a notification if the freezer is too cold. To preserve power, the app runs the temperature sensor code before initiating the WiFi connection. If there is no notification to send, the SiB powers off immediately. PROG readtemp PREW ; this line instructs the SiB not to initiate a WiFi connection ; until a POST command is encountered ; this allows your program to run and read sensors with less power use INIT counter=0 ; a variable to count how many times this has run INIT lasttemp=0 ; the variable lasttemp is used to compare ; the current temperature in the freezer to the last measured temperature TEMP myval ; read the freezer temperature into a variable named myval RV rvr ; read the battery level (in mv) into a variable (rvr) ; if the freezer is colder than -25 degrees celcius ; connect to WiFi and notify the owner IF myval < -25 POST IM Freezer appears to cold at myval Celsius EI ; if the freezer is warmer than -17 degrees celcius and getting warmer IF myval > -17 and myval>lasttemp POST IM Freezer temp above normal, at myval Celsius EI ; increment our run counter SET counter=counter+1 ; at 20 minute intervals, 72 runs represents a full day ; send a daily notification regardless of the temperature ; and the current battery level if counter >= 72 POST SM My current freezer temperature is myval Celsius and my battery level is myrv SET counter=0 EI SET lasttemp=myval SL 20m LOOPTO SUBMIT THIS PROGRAM: First, you must calibrate your SiB temperature. Simply send the command "CALIB TEMP 21", if it is 21 degrees Celcius where your SiB is. The calibration process takes 10 minutes. Next, send MODE SID to your SiB, as this is a SID program. It is not activated by the button press but rather by a timed sensor event. Next, send the above program in an IM to your SiB, and press your SiB to receive the program. Finally, place your SiB in your freezer. |