TOP Contributors

  1. MIKROE (2751 codes)
  2. Alcides Ramos (372 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 (139058 times)
  2. FAT32 Library (71588 times)
  3. Network Ethernet Library (56988 times)
  4. USB Device Library (47330 times)
  5. Network WiFi Library (43006 times)
  6. FT800 Library (42297 times)
  7. GSM click (29771 times)
  8. mikroSDK (27874 times)
  9. PID Library (26858 times)
  10. microSD click (26129 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: 7206 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

Ambient 5 Click

0

Ambient 5 Click can sense the intensity of the ambient light, providing measurement data in a digital format, over the I2C interface. It utilizes the VEML6030, a miniature ambient light sensor (ALS) which occupies only 2x2 mm of space.

[Learn More]

Accel 7 click

5

Accel 7 click is a three-axis acceleration sensing Click board™. It uses the KXTJ3-1057, a 14bit tri-axis digital accelerometer, which can sense the acceleration up to ±16 g. This sensor is built using the proprietary Kionix micromachining technology, which results with a high accuracy and very good noise immunity.

[Learn More]

Ambient 15 Click

0

Ambient 15 Click is a compact add-on board used to measure the amount of the present ambient light. This board features the TSL2584TSV, a very-high sensitivity light-to-digital converter with an I2C interface that transforms light intensity into a digital output signal from AMS-AG. The TSL2584TSV’s near-photopic response produces a highly accurate lux measurement up to 33klx even when mounted behind dark glass. Filtering out unwanted IR light enables the sensor to measure the ambient light more accurately, thus producing a near-photopic response.

[Learn More]