Here is the picture of the complete, simple setup, before putting on my car.
Here is a screen capture of the map it produced after a day of driving:
Here is a link to the live dashboard https://portals.exosite.com/views/1265154472/2460159184
Development kit on Arduino Leonardo plus Antenna and open/close sensor. |
/* SMS Cookie alarm This sketch is an example that sends SMS messages using the Telit CE910-DUAL modem. Circuit: * Arduino Leonardo * Skywire development kit: NL-SWDK-1xRTT and NL-SW-1xRTT created 2/15/2014 by Kurt Larson // NimbeLink.com This example is in the public domain. */ #define DESTINATION_PHONE_NUMBER "15554443333" // destination phone number of 1-555-444-3333 should be formated like: 15554443333 String SMS_MESSAGE = "Cookies are under attack! Sent via Arduino & Skywire cellular modem!"; // SMS message you want to send, limited to 160 characters void setup() // Initializes the pins, serial ports, modem { pinMode(10, INPUT); // Set I/O pin 10 to input for door open/close sensor pinMode(13, OUTPUT); // Set LED pin to output digitalWrite(12, LOW); // Set I/O pin 12 to low pinMode(12, OUTPUT); // Configure I/O pin 12 as output digitalWrite(12, LOW); // Drive I/O pin 12 low delay(1100); // modem requires >1s pulse pinMode(12, INPUT); // Return I/O pin 12 to input/hi-Z state and wait >10 seconds for modem software to boot up delay(10000); // modem documentation says wait 10 seconds Serial1.begin(115200); // Initialize serial port to communicate with modem while (!Serial1) ; Serial1.println("AT+CMGF=1"); // put modem into text mode delay(250); // wait for modem response } void loop() { if (digitalRead(10) == 1) { // if the signal goes high, that means the open/close sensor is open, so send an alert digitalWrite(13, LOW); Serial1.print("AT+CMGS=\"+"); Serial1.print(DESTINATION_PHONE_NUMBER); Serial1.print("\"\r"); delay(250); Serial1.print(SMS_MESSAGE); Serial1.write(26); Serial1.write("\r"); delay(300000); // do not retrigger for 5 minutes } } For more information, checkout the Skywire product page here.