thingstream 2.0.0.0
main.c File Reference

Thingstream Click example. More...

#include "board.h"
#include "log.h"
#include "thingstream.h"
#include "string.h"

Macros

#define PROCESS_COUNTER   600
 
#define PROCESS_RX_BUFFER_SIZE   600
 
#define PROCESS_PARSER_BUFFER_SIZE   600
 
#define THINGSTREAM_INFO   "AT+IOTINFO"
 
#define THINGSTREAM_CREATE   "AT+IOTCREATE"
 
#define THINGSTREAM_CONNECT   "AT+IOTCONNECT=true"
 
#define THINGSTREAM_GPS_PWR   "AT+IOTCGNSPWR=1"
 
#define THINGSTREAM_SUBSCRIBE   "AT+IOTSUBSCRIBE=\"home/temperature\",1"
 
#define THINGSTREAM_PUBLISH   "AT+IOTPUBLISH=\"home/temperature\",0,\"23 degrees\""
 
#define THINGSTREAM_GPS_INFO   "AT+IOTCGNSINF"
 

Functions

void application_init (void)
 
void application_task (void)
 
int main (void)
 

Detailed Description

Thingstream Click example.

Description

This example reads and processes data from Thingstream clicks.

The demo application is composed of two sections :

Application Init

Initializes driver and power module.

Application Task

Reads the received data and parses it.

Additional Function

  • thingstream_process ( ) - The general process of collecting data the module sends.
Note
The click board needs to be registered with a redemption code to a Thingstream Domain. For more information please refer to the Thingstream click user manual available on the product page.
Author
MikroE Team

Macro Definition Documentation

◆ PROCESS_COUNTER

#define PROCESS_COUNTER   600

◆ PROCESS_PARSER_BUFFER_SIZE

#define PROCESS_PARSER_BUFFER_SIZE   600

◆ PROCESS_RX_BUFFER_SIZE

#define PROCESS_RX_BUFFER_SIZE   600

◆ THINGSTREAM_CONNECT

#define THINGSTREAM_CONNECT   "AT+IOTCONNECT=true"

◆ THINGSTREAM_CREATE

#define THINGSTREAM_CREATE   "AT+IOTCREATE"

◆ THINGSTREAM_GPS_INFO

#define THINGSTREAM_GPS_INFO   "AT+IOTCGNSINF"

◆ THINGSTREAM_GPS_PWR

#define THINGSTREAM_GPS_PWR   "AT+IOTCGNSPWR=1"

◆ THINGSTREAM_INFO

#define THINGSTREAM_INFO   "AT+IOTINFO"

◆ THINGSTREAM_PUBLISH

#define THINGSTREAM_PUBLISH   "AT+IOTPUBLISH=\"home/temperature\",0,\"23 degrees\""

◆ THINGSTREAM_SUBSCRIBE

#define THINGSTREAM_SUBSCRIBE   "AT+IOTSUBSCRIBE=\"home/temperature\",1"

Function Documentation

◆ application_init()

void application_init ( void )

Logger initialization. Default baud rate: 115200 Default log level: LOG_LEVEL_DEBUG

Note
If USB_UART_RX and USB_UART_TX are defined as HAL_PIN_NC, you will need to define them manually for log to work. See LOG_MAP_USB_UART macro definition for detailed explanation.

◆ application_task()

void application_task ( void )

◆ main()

int main ( void )