Skip to content

Commit 46ce098

Browse files
committed
Remembered to turn modem on and off in examples!
1 parent 13050d7 commit 46ce098

File tree

5 files changed

+16
-4
lines changed

5 files changed

+16
-4
lines changed

examples/DRWI_CitSci/DRWI_CitSci.ino

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,8 @@ void setup()
197197

198198
EnviroDIYLogger.modem.setupModem(&ModemSerial, modemVCCPin, modemCTSPin, modemDTRPin, ModemSleepMode, APN);
199199

200+
// Turn on the modem
201+
EnviroDIYLogger.modem.modemOnOff->on();
200202
// Connect to the network
201203
if (EnviroDIYLogger.modem.connectNetwork())
202204
{
@@ -205,6 +207,8 @@ void setup()
205207
// Disconnect from the network
206208
EnviroDIYLogger.modem.disconnectNetwork();
207209
}
210+
// Turn off the modem
211+
EnviroDIYLogger.modem.modemOnOff->off();
208212

209213
#ifdef DreamHostPortalRX
210214
EnviroDIYLogger.setDreamHostPortalRX(DreamHostPortalRX);

examples/double_logger/double_logger.ino

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,8 @@ void setup()
164164

165165
modem.setupModem(&ModemSerial, modemVCCPin, modemCTSPin, modemDTRPin, ModemSleepMode, SSID, PWD);
166166

167+
// Turn on the modem
168+
modem.modemOnOff->on();
167169
// Connect to the network
168170
if (modem.connectNetwork())
169171
{
@@ -172,6 +174,8 @@ void setup()
172174
// Disconnect from the network
173175
modem.disconnectNetwork();
174176
}
177+
// Turn off the modem
178+
modem.modemOnOff->off();
175179

176180
// Start the Real Time Clock
177181
rtc.begin();
@@ -276,9 +280,9 @@ void loop()
276280
{
277281
// Synchronize the RTC
278282
modem.syncDS3231();
283+
// Disconnect from the network
284+
modem.disconnectNetwork();
279285
}
280-
// Disconnect from the network
281-
modem.disconnectNetwork();
282286
// Turn off the modem
283287
modem.modemOnOff->off();
284288
}

examples/logging_to_EnviroDIY/logging_to_EnviroDIY.ino

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,8 @@ void setup()
335335
EnviroDIYLogger.modem.setupModem(&ModemSerial, modemVCCPin, modemCTSPin, modemDTRPin, ModemSleepMode, APN);
336336
#endif
337337

338+
// Turn on the modem
339+
EnviroDIYLogger.modem.modemOnOff->on();
338340
// Connect to the network
339341
if (EnviroDIYLogger.modem.connectNetwork())
340342
{
@@ -343,6 +345,8 @@ void setup()
343345
// Disconnect from the network
344346
EnviroDIYLogger.modem.disconnectNetwork();
345347
}
348+
// Turn off the modem
349+
EnviroDIYLogger.modem.modemOnOff->off();
346350

347351
#ifdef DreamHostPortalRX
348352
EnviroDIYLogger.setDreamHostPortalRX(DreamHostPortalRX);

library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"url": "https://envirodiy.org/"
1919
}
2020
],
21-
"version": "0.2.3-beta",
21+
"version": "0.2.4-beta",
2222
"repository":
2323
{
2424
"type": "git",

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=EnviroDIY_ModularSensors
2-
version=0.2.3-beta
2+
version=0.2.4-beta
33
author=Sara Damiano <sdamiano@stroudcenter.org>, Shannon Hicks <shicks@stroudcenter.org>
44
maintainer=Sara Damiano <sdamiano@stroudcenter.org>
55
sentence=A library that allows acces to multiple sensors through a unified interface.

0 commit comments

Comments
 (0)