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: 2020-07-06
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: GPS/GNSS
Downloaded: 2545 times
Not followed.
License: MIT license
Nano GPS 2 Click features the smallest GPS module with an integrated patch antenna, the ORG1510-MK05 a module from OriginGPS. It’s the world’s smallest multi-constellation antenna module enabling high-performance in a variety of applications.
Library Description
Library provides function for controlling GPIO, sending commands over UART module. There is generic parser that can parse response of specific command that device is sending, buffer for parser is getting data from process function that sends one byte of data to buffer, and there is function for clearing that buffer.
Key functions:
uint8_t nanogps2_generic_parser ( char *command, uint8_t element, char *parser_buf )
- Generic parser functionvoid nanogps2_process ( char temp )
- Process function that adds byte data to buffer for parsingvoid nanogps2_clear_rsp_buf ( void )
- Function for clearing buffer for parsingExamples description
The application is composed of three sections :
void application_task ( )
{
error_flag = NANOGPS2_DEV_OK;
error_flag |= nanogps2_generic_parser( NANOGPS2_GNGGA_DATA_CMD,
NANOGPS2_GNGGA_LONGITUDE,
&p_lon[ 0 ] );
error_flag |= nanogps2_generic_parser( NANOGPS2_GNGGA_DATA_CMD,
NANOGPS2_GNGGA_LATITUDE,
&p_lat[ 0 ] );
error_flag |= nanogps2_generic_parser( NANOGPS2_GNGGA_DATA_CMD,
NANOGPS2_GNGGA_ALTITUDE,
&p_alt[ 0 ] );
if ( ( NANOGPS2_DEV_OK == error_flag ) &&
( p_lon[0] != 0 ) && ( p_lat[0] != 0 ) && ( p_alt[0] != 0 ) )
{
mikrobus_logWrite( " - Latitude: ", _LOG_TEXT );
mikrobus_logWrite( p_lat, _LOG_LINE );
mikrobus_logWrite( " - Longitude: ", _LOG_TEXT );
mikrobus_logWrite( p_lon, _LOG_LINE );
mikrobus_logWrite( " - Altitude: ", _LOG_TEXT );
mikrobus_logWrite( p_alt, _LOG_LINE );
mikrobus_logWrite( "-------------------------------------", _LOG_LINE );
memset( &p_lat[ 0 ], 0, 50 );
memset( &p_lon[ 0 ], 0, 50 );
memset( &p_alt[ 0 ], 0, 50 );
}
if ( NANOGPS2_DEV_OK == error_flag )
{
nanogps2_clear_rsp_buf( );
}
}
Other mikroE Libraries used in the example:
Additional notes and informations
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.
Air Quality 12 Click is a compact add-on board for monitoring indoor air quality. This board features the RRH46410, a digital gas sensor module from Renesas, which integrates advanced sensing technology for precise detection of total volatile organic compounds (TVOC), indoor air quality (IAQ), and estimated carbon dioxide levels (eCO2). This module features a MEMS gas sensing element with a metal oxide (MOx) chemiresistor, a CMOS signal conditioning IC, and an onboard MCU, offering a complete, self-contained solution with low power consumption and support for both UART and I2C communication.
[Learn More]PULSE click is a pulse generator with an adjustable frequency. It carries the NEN555 precision timer capable of producing highly accurate time delays.
[Learn More]MUX 3 Click is the general purpose multiplexer which offers multiplexing one input channel to eight single-ended output channels.
[Learn More]You have unsaved changes. If you choose to leave all changes will be discarded.
Do you want to subscribe in order to receive notifications regarding "Nano GPS 2 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Nano GPS 2 click" changes.
Do you want to report abuse regarding "Nano GPS 2 click".