TOP Contributors

  1. MIKROE (2642 codes)
  2. Alcides Ramos (348 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Chisanga Mumba (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (136230 times)
  2. FAT32 Library (69500 times)
  3. Network Ethernet Library (55712 times)
  4. USB Device Library (45998 times)
  5. Network WiFi Library (41640 times)
  6. FT800 Library (40804 times)
  7. GSM click (28789 times)
  8. PID Library (26333 times)
  9. mikroSDK (26062 times)
  10. microSD click (25148 times)
Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

< Back
mikroSDK Library

Thingstream Click

Rating:

5

Author: MIKROE

Last Updated: 2019-09-20

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: GSM+GPS

Downloaded: 3231 times

Not followed.

License: MIT license  

Thingstream Click is a gateway Click board which provides a simple and reliable connection to the Thingstream Cloud platform, a cloud-based rapid prototyping environment, hosted by Thingstream AG.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "Thingstream Click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "Thingstream Click" changes.

Do you want to report abuse regarding "Thingstream Click".

  • mikroSDK Library 2.0.0.0
  • Comments (0)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroBasic PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

mikroSDK Library Blog

Thingstream Click

Thingstream Click

Native view of the Thingstream Click board.

View full image
Thingstream Click

Thingstream Click

Front and back view of the Thingstream Click board.

View full image

Library Description

Library provides functions for powering up device, sending commands and controlling device, and function for parsing data read from GPS module.

Key functions:

  • void thingstream_cmd_single ( char *p_cmd ) - Fucntion for sending commands to device
  • char *thingstream_gps_parser (char *data_in, char *cmd, uint8_t data_pos) - Function for parsing GPS data
  • void thingstream_module_power ( uint8_t power_state ) - Function for powering up module

Examples description

The application is composed of three sections :

  • System Initialization - Initializes necessary GPIO pin, UART used for the communcation with GSM module and UART used for infromation logging
  • Application Initialization - Initializes driver, power on module and sends few command for the default module configuration
  • Application Task - Waits till GPS module turns on then reads data from buffer parses is and logs it.
void application_task ( )
{
     char *p_data;
     char rsp_com[ 50 ] = {0};

     if ( gps_rsp_ready == 0 )
     {
         mikrobus_logWrite( " - Waiting to GPS to start... ", _LOG_LINE );

         thingstream_cmd_single( &THINGSTREAM_GPS_INFO[ 0 ] );
         p_data = thingstream_gps_parser( &demo_buf[ 0 ], &demo_cmd[ 0 ], 1 );
         strcpy( &rsp_com[ 0 ], p_data );
         
         while ( rsp_com[ 0 ] != '1' )
         {
             thingstream_cmd_single( &THINGSTREAM_GPS_INFO[ 0 ] );
             p_data = thingstream_gps_parser( &demo_buf[ 0 ], &demo_cmd[ 0 ], 1 );
             strcpy( &rsp_com[ 0 ], p_data );

             Delay_ms( 1000 );
         }
         mikrobus_logWrite( " - GPS - ", _LOG_LINE );
         gps_rsp_ready = 1;
         int_flag = 0;
     }
     else
     {
         thingstream_cmd_single( &THINGSTREAM_GPS_INFO[ 0 ] );
         while ( int_flag != 1 );
         int_flag = 0;
     }

     mikrobus_logWrite( " ---------------------------------------- ", _LOG_LINE);
     p_data = thingstream_gps_parser( &demo_buf[ 0 ], &demo_cmd[ 0 ], 3 );
     if ( p_data == 0 )
     {
         mikrobus_logWrite( " Latitude : No data available!", _LOG_LINE);
     }
     else
     {
         strcpy( &rsp_com[ 0 ], p_data );
         mikrobus_logWrite( " Latitude : ", _LOG_TEXT );
         mikrobus_logWrite( rsp_com, _LOG_LINE );
     }
     
     Delay_ms( 500 );

     p_data = thingstream_gps_parser( &demo_buf[ 0 ], &demo_cmd[ 0 ], 4 );
     if ( p_data == 0 )
     {
         mikrobus_logWrite( " Longitude : No data available!", _LOG_LINE);
     }
     else
     {
         strcpy( &rsp_com[ 0 ], p_data );
         mikrobus_logWrite( " Longitude : ", _LOG_TEXT );
         mikrobus_logWrite( rsp_com, _LOG_LINE );
     }

     Delay_ms( 500 );
     
     p_data = thingstream_gps_parser( &demo_buf[ 0 ], &demo_cmd[ 0 ], 5 );
     if ( p_data == 0 )
     {
         mikrobus_logWrite( " Altitude : No data available!", _LOG_LINE);
     }
     else
     {
         strcpy( &rsp_com[ 0 ], p_data );
         mikrobus_logWrite( " Altitude : ", _LOG_TEXT );
         mikrobus_logWrite( rsp_com, _LOG_LINE );
     }
     mikrobus_logWrite( " ---------------------------------------- ", _LOG_LINE);
     mikrobus_logWrite( " ", _LOG_LINE);

     Delay_ms( 5000 );
}


Additional Functions :

All additional functions such as timer initialization and default handler.

Other mikroE Libraries used in the example:

  • UART
  • Conversions
  • C_String

Additional notes and informations

Depending on the development board you are using, you may need USB UART clickUSB UART 2 click or RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.

ALSO FROM THIS AUTHOR

Barometer 13 click

0

Barometer 13 Click is a compact add-on board that measures air pressure in a specific environment. This board features the BMP585, a barometric pressure sensor from Bosch Sensortec. It has a nominal operating pressure range of 30 up to 125kPa and a temperature operating range from -40 to +85°C. The sensor provides true absolute pressure and temperature readings due to on-chip linearization and temperature compensation.

[Learn More]

Analog MUX 3 click

0

Analog MUX 3 Click is a compact add-on board that switches one of the eight inputs to one output. This board features the ADG738, a CMOS analog matrix switch with a serially-controlled SPI interface from Analog Devices. In an active state, the ADG738 conducts equally well in both directions, making it suitable for multiplexing and demultiplexing applications. It can also be configured as a type of switch array where any, all, or none of eight switches may be closed any time. All channels exhibit ‘break-before-make switching action, preventing momentary shorting when switching channels. This Click board™ is suitable for a wide range of applications, from industrial and instrumentation to medical, consumer, communications, and automotive systems.

[Learn More]

RN4870 click

0

RN4870 click carries the RN4870 Bluetooth® 4.2 low energy module from Microchip. The click is designed to run on a 3.3V power supply. It uses ASCII Command Interface over UART for communication with target microcontroller, with additional functionality provided by the following pins on the mikroBUS™ line: PWM, INT, RST, CS.

[Learn More]