TOP Contributors

  1. MIKROE (2650 codes)
  2. Alcides Ramos (350 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 (136554 times)
  2. FAT32 Library (69757 times)
  3. Network Ethernet Library (55855 times)
  4. USB Device Library (46195 times)
  5. Network WiFi Library (41816 times)
  6. FT800 Library (41010 times)
  7. GSM click (28931 times)
  8. PID Library (26386 times)
  9. mikroSDK (26297 times)
  10. microSD click (25305 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: 6453 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

R Meter click

1

R Meter click is a mikroBUS add-on board with circuitry for measuring the value of resistors. The board can be used to measure a wide range of resistors (from 0 to 1 Mega Ohm) The design is based on a non-inverting amplifier circuit, with the measured resistor placed in a feedback loop that influences the gain of the amplifier.

[Learn More]

FTDI click - Example

0

This is demonstration project how FTDI click can be used to control slave microcontroller via I2C. Lower nibble of slave address is masked which enables the master to address slave using eight different addresses. Currently four addresses are implemented for different functionality.

[Learn More]

Angle 5 click

5

Angle 5 Click is a compact add-on board that detects the absolute angular position of a permanent magnet, typically a diametrically magnetized cylinder on a rotating shaft.

[Learn More]