TOP Contributors

  1. MIKROE (2779 codes)
  2. Alcides Ramos (376 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (97 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 (139568 times)
  2. FAT32 Library (72041 times)
  3. Network Ethernet Library (57256 times)
  4. USB Device Library (47631 times)
  5. Network WiFi Library (43220 times)
  6. FT800 Library (42566 times)
  7. GSM click (29932 times)
  8. mikroSDK (28292 times)
  9. PID Library (26934 times)
  10. microSD click (26309 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

G2C click

Rating:

5

Author: MIKROE

Last Updated: 2019-03-21

Package Version: 1.0.0.1

mikroSDK Library: 1.0.0.0

Category: WIFI

Downloaded: 7479 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.

No Abuse Reported

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".

  • 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

G2C click

G2C click

Native view of the G2C click board.

View full image
G2C click

G2C click

Front and back view of the G2C click board.

View full image

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 module
  • void g2c_coreInit( T_g2c_handler defaultHdl, uint32_t defaultWdog ) - Core Initialization
  • void g2c_modulePower( bool powerState ) - Turn ON or OFF the module.
  • void g2c_process() - AT Engine State Machine

Examples description

The application is composed of the three sections :

  • System Initialization - Initializes all necessary GPIO pins, UART used for the communication with G2C click.
  • Application Initialization - Initializes driver, power on module. Commands are sent to prepare the module for communication with the g2c.
  • Application Task - running in parallel core state machine and checks for the URC message from Click G2C.

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 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

DIGI POT 3 Click

0

DIGI POT 3 Click is a versatile and feature-rich digital potentiometer Click with 1024 steps and an internal non-volatile memory (EEMEM), which can be used for storing the wiper position, but also for storing various user data.

[Learn More]

LTE IoT click

5

LTE IoT click is a Click board that allows connection to the LTE and 2G networks, featuring the compact form-factor SARA R410 LTE/2G module, which offers two LTE technologies aimed at Machine to Machine communication (M2M) and the Internet of Things (IoT).

[Learn More]

EEPROM Click

0

EEPROM Click is an accessory board in mikroBUS form factor. It features 24C08WP - a highly reliable, high performance CMOS technology serial 8K EEPROM in DIP packaging.

[Learn More]