//~~STARTUP // Code to execute when unit starts up io3=1 //button between IO3 and IO2 timer_interval=10 //~~TIMER // Code to execute every TIMER_INTERVAL milliseconds // e.g. to execute code every 5 seconds, type: TIMER_INTERVAL=5000 if (IO2>1) then begin pressed++ LED=2 panic$="Panic Alert!! Position: "+GPS_LAT+","+GPS_LNG+ " Time: "+RTC_HOUR+":"; if (RTC_MINUTE<10) panic$=panic$+"0" ; panic$=panic$+RTC_MINUTE; sendsms("0720000000",panic$); wait(5000) override_led=0 end //~~CALL // Code to execute when receiving an incoming call //~~SMS // Code to execute when receiving an SMS //~~MOVEMENT // Code to execute when detecting movement. // The movement intensity is stored in ACC_DETECT, as well as ACC_X, AXX_Y and AXX_Z //~~USSD // Code to execute when receiving a reply from a USSD string. // Reply is stored in INCOMING_USSD$ string //~~GPRS // Code to execute when receiving GPRS data. // Data is stored in INCOMING_GPRS$ string