MIKROE-2440

Codesnippet
This code snippet initializes the MCU and the module. It first sends an initial message to the user
and then logs an events such as calls or messages on the microSD card and reads the current GPS
location, all in an infinite loop.
01 void main( void )
02 {
03 system_init();
04 at_init( rsp_handler, UART1_Write, buffer, sizeof( buffer ) );
05 at_cmd_save( "+CMS ERROR", 1000, NULL, NULL, NULL,
at_cb_send_init_message );
06 at_cmd_save( "+FSMEM", 3000, NULL, NULL, NULL, at_cb_microsd_end );
07 at_cmd_save( "+CMT", 3000, NULL, NULL, NULL, sms_action_handler );
08 at_cmd_save( "+CMGS", 1000, NULL, NULL, NULL, at_cb_send_init_message
);
09
10 gsm_gnss_2_power_on();
11
12 gsm_gnss_2_init();
13
14 send_SMS(); // Sending initial message
15
16 while( !msg_sent ) at_process(); // Waiting for SMS sending
status
17
18 LOG( "rn**********************************************************rn"
);
19 LOG( "Finished Sending SMS Message.");
20 LOG( "rn**********************************************************rn"
);
21
22 micro_SD(); // Creating files on microSD
23
24 while( !sd_f ) at_process(); // Waiting for SD card
operations
25
26 LOG( "rn**********************************************************rn"
);
27 LOG( "Finished SD Initialization.");
28 LOG( "rn**********************************************************rn"
);
29 Delay_ms( 1000 );
30
31 LOG( "rn**********************************************************rn"
);
32 LOG( "Waiting for the Message or Call in an Infinite Loop");
33 LOG( "rn**********************************************************rn"
);
34
35
////////////////////////////////////////////////////////////////////////////
36 while( true )
37 {
38 at_process();
39
40 if ( action_f ) // Message received or call
ended
41 {
42 update_log();
43 action_f = false;
44 }
45 }
46
////////////////////////////////////////////////////////////////////////////
47 }
https://shop.mikroe.com/click/wirelessconnectivity/gsmgnss24/5/17

MIKROE-2440

Mfr. #:
Manufacturer:
Mikroe
Description:
RF Development Tools GSM/GNSS 2 click
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union

Products related to this Datasheet