Example program for power saving mode of cellular modem. This program can be used with UBLOX_C030_R412M board.
Dependencies: ublox-at-cellular-interface ublox-cellular-base ublox-cellular-base-n2xx ublox-at-cellular-interface-n2xx
Revision 6:29f8fd75379d, committed 2019-11-06
- Comitter:
- qasim-ublox
- Date:
- Wed Nov 06 16:42:09 2019 +0500
- Parent:
- 5:03b0e59d354f
- Commit message:
- Added delay to keep the modem in PSM for while
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 03b0e59d354f -r 29f8fd75379d main.cpp --- a/main.cpp Tue Nov 05 12:53:47 2019 +0000 +++ b/main.cpp Wed Nov 06 16:42:09 2019 +0500 @@ -165,7 +165,7 @@ ain = 0; for(int i = 0; i < c_number_of_analog_samples; i++) { ain = (ain + ain_icellular.read()); - Thread::wait(2); + Thread::wait(20); } ain = ain/c_number_of_analog_samples; icellular_val = (ain*1.8*1000)/7.0f; @@ -180,7 +180,6 @@ void icell_thread_handler() { while(1) { - Thread::wait(2000); calculate_icellular_samples(); } } @@ -349,7 +348,7 @@ #endif /* TARGET_UBLOX_C030_R412M */ - wait_ms(5000); + wait_ms(20000); #ifndef TARGET_UBLOX_C027 print_function("\n\n[Checking if user button has been pressed]\n"); #endif