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]
Rating:
Author: MIKROE
Last Updated: 2019-03-21
Package Version: 1.0.0.1
mikroSDK Library: 1.0.0.0
Category: WIFI
Downloaded: 7334 times
Not followed.
License: MIT license
Go to Cloud (G2C) click is a gateway Click board that provides a simple and reliable connection to Click Cloud solution, a rapid prototyping cloud-based environment, hosted by MikroElektronika.
Do you want to subscribe in order to receive notifications regarding "G2C click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "G2C click" changes.
Do you want to report abuse regarding "G2C click".
Library Description
The library carries generic command parser adopted for AT command based modules. The library contains an example for basic initialization of the actuator and sensor demo example.
Key functions:
void g2c_cmdSingle( char *pCmd )
- Sends provided command to the modulevoid g2c_coreInit( T_g2c_handler defaultHdl, uint32_t defaultWdog )
- Core Initializationvoid g2c_modulePower( bool powerState )
- Turn ON or OFF the module.void g2c_process()
- AT Engine State MachineExamples description
The application is composed of the three sections :
Note: Example demonstrates the measurement of inductance change depending on the linear motion of the metal object. Induction of the linear metal position depends on the type of metal and the configuration.
void applicationTask()
{
char demoBuffer[ 50 ];
// CORE STATE MACHINE
g2c_process();
// SENSOR - Remove if not used
if( taskTime > 1500 )
{
taskTime = 0;
g2c_packCmd( &_AT_DSET[0], &g2c_sensorRef[0], &demoBuffer[0]);
g2c_cmdSingle( &_AT_PUB[0] );
}
// ACTUATOR - Remove if not used
if(state == 1 && oldstate == 0)
{
// User code if the swithc is set to 1
oldstate = 1;
}
if(state == 0 && oldstate == 1)
{
// User code if the swithc is set to 0
oldstate = 0;
}
}
Other mikroE Libraries used in the example:
UART
String
Conversion
Additional notes and information
Depending on the development board you are using, you may need USB UART click, USB 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.