aboutsummaryrefslogtreecommitdiff
path: root/libraries/GSM/examples/Tools/TestModem
diff options
context:
space:
mode:
authorCristian Maglie <c.maglie@bug.st>2013-08-08 16:43:19 +0200
committerCristian Maglie <c.maglie@bug.st>2013-08-08 16:43:19 +0200
commita8193ed933d9c9954cefbfb541cde56770ab5b74 (patch)
tree80796833fecca5d7426f1d09f7ac9870bab5f062 /libraries/GSM/examples/Tools/TestModem
parenta4c9fee673342304a5b12f7f2f7f9ecb9cb26d30 (diff)
parent5527c44aa443b20d63cf7a276180a36695233924 (diff)
Merge branch 'ide-1.5.x-library-to-new-format' into ide-1.5.x
Diffstat (limited to 'libraries/GSM/examples/Tools/TestModem')
-rw-r--r--libraries/GSM/examples/Tools/TestModem/TestModem.ino77
1 files changed, 0 insertions, 77 deletions
diff --git a/libraries/GSM/examples/Tools/TestModem/TestModem.ino b/libraries/GSM/examples/Tools/TestModem/TestModem.ino
deleted file mode 100644
index de61fff..0000000
--- a/libraries/GSM/examples/Tools/TestModem/TestModem.ino
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
-
- This example tests to see if the modem of the
- GSM shield is working correctly. You do not need
- a SIM card for this example.
-
- Circuit:
- * GSM shield attached
-
- Created 12 Jun 2012
- by David del Peral
- modified 21 Nov 2012
- by Tom Igoe
-
- http://arduino.cc/en/Tutorial/GSMToolsTestModem
-
- This sample code is part of the public domain
-
- */
-
-// libraries
-#include <GSM.h>
-
-// modem verification object
-GSMModem modem;
-
-// IMEI variable
-String IMEI = "";
-
-void setup()
-{
- // initialize serial communications and wait for port to open:
- Serial.begin(9600);
- while (!Serial) {
- ; // wait for serial port to connect. Needed for Leonardo only
- }
-
- // start modem test (reset and check response)
- Serial.print("Starting modem test...");
- if(modem.begin())
- Serial.println("modem.begin() succeeded");
- else
- Serial.println("ERROR, no modem answer.");
-}
-
-void loop()
-{
- // get modem IMEI
- Serial.print("Checking IMEI...");
- IMEI = modem.getIMEI();
-
- // check IMEI response
- if(IMEI != NULL)
- {
- // show IMEI in serial monitor
- Serial.println("Modem's IMEI: " + IMEI);
- // reset modem to check booting:
- Serial.print("Resetting modem...");
- modem.begin();
- // get and check IMEI one more time
- if(modem.getIMEI() != NULL)
- {
- Serial.println("Modem is functoning properly");
- }
- else
- {
- Serial.println("Error: getIMEI() failed after modem.begin()");
- }
- }
- else
- {
- Serial.println("Error: Could not get IMEI");
- }
- // do nothing:
- while(true);
-}
-