Add poweroff
This commit is contained in:
@@ -30,6 +30,7 @@
|
|||||||
|
|
||||||
|
|
||||||
//#define DUMP_AT_COMMANDS
|
//#define DUMP_AT_COMMANDS
|
||||||
|
#define TINY_GSM_DEBUG SerialMon
|
||||||
|
|
||||||
// Set phone numbers, if you want to test SMS and Calls
|
// Set phone numbers, if you want to test SMS and Calls
|
||||||
//#define SMS_TARGET "+380xxxxxxxxx"
|
//#define SMS_TARGET "+380xxxxxxxxx"
|
||||||
@@ -70,6 +71,9 @@ void loop() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String modemInfo = modem.getModemInfo();
|
||||||
|
DBG("Modem:", modemInfo);
|
||||||
|
|
||||||
// Unlock your SIM card with a PIN
|
// Unlock your SIM card with a PIN
|
||||||
//modem.simUnlock("1234");
|
//modem.simUnlock("1234");
|
||||||
|
|
||||||
@@ -87,9 +91,6 @@ void loop() {
|
|||||||
|
|
||||||
bool res;
|
bool res;
|
||||||
|
|
||||||
String modemInfo = modem.getModemInfo();
|
|
||||||
DBG("Modem:", modemInfo);
|
|
||||||
|
|
||||||
String ccid = modem.getSimCCID();
|
String ccid = modem.getSimCCID();
|
||||||
DBG("CCID:", ccid);
|
DBG("CCID:", ccid);
|
||||||
|
|
||||||
@@ -147,9 +148,14 @@ void loop() {
|
|||||||
modem.gprsDisconnect();
|
modem.gprsDisconnect();
|
||||||
DBG("GPRS disconnected");
|
DBG("GPRS disconnected");
|
||||||
|
|
||||||
|
// Try to power-off (modem may decide to restart automatically)
|
||||||
|
// To turn off modem completely, please use Reset/Enable pins
|
||||||
|
modem.poweroff();
|
||||||
|
DBG("Poweroff.");
|
||||||
|
|
||||||
// Do nothing forevermore
|
// Do nothing forevermore
|
||||||
while (true) {
|
while (true) {
|
||||||
delay(1000);
|
modem.maintain();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user