TOP Contributors

  1. MIKROE (2762 codes)
  2. Alcides Ramos (374 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (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 (139254 times)
  2. FAT32 Library (71751 times)
  3. Network Ethernet Library (57122 times)
  4. USB Device Library (47430 times)
  5. Network WiFi Library (43082 times)
  6. FT800 Library (42403 times)
  7. GSM click (29835 times)
  8. mikroSDK (28078 times)
  9. PID Library (26885 times)
  10. microSD click (26198 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: 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.

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

Accel 18 Click

0

Accel 18 Click is a compact add-on board that contains an acceleration sensor. This board features the MC3419, a digital output 3-axis accelerometer with a feature set optimized for consumer product motion sensing from MEMSIC.

[Learn More]

USB-C Power Click

0

USB-C Power Click is a compact add-on board that provides a quick and easy way to supply power without carrying multiple adapters or cables. This board features the TPS25750S, a highly integrated USB Type-C and Power Delivery (PD) controller with integrated power switches optimized for power applications from Texas Instruments. The TPS25750S integrates fully managed power paths (5V/3A with 36mΩ sourcing switch) with robust protection (reverse and inrush current as well as over/under voltage protection) and control for external battery charger IC for a complete USB-C PD solution. Besides web-based GUI and pre-configured firmware, the TPS25750S also has some GPIOs and LED indicators that are user-defined for either status or control information.

[Learn More]

LTE IoT 9 Click

0

LTE IoT 9 Click is a compact add-on board containing a cellular IoT Module that supports 3GPP Release 14 and all LTE bands.

[Learn More]