Skip to content
This repository has been archived by the owner on May 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #8 from 107-systems/improve-docu
Browse files Browse the repository at this point in the history
Improve documentation
  • Loading branch information
aentinger authored Jul 10, 2020
2 parents 2cc5126 + 016972a commit 100765f
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 1 deletion.
27 changes: 26 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,33 @@
[![General Formatting Checks](https://github.com/107-systems/107-Arduino-NMEA-Parser/workflows/General%20Formatting%20Checks/badge.svg)](https://github.com/107-systems/107-Arduino-NMEA-Parser/actions?workflow=General+Formatting+Checks)
[![Spell Check](https://github.com/107-systems/107-Arduino-NMEA-Parser/workflows/Spell%20Check/badge.svg)](https://github.com/107-systems/107-Arduino-NMEA-Parser/actions?workflow=Spell+Check)

Arduino library for interfacing with the PA1010D GPS module (MTK3333 chipset) and interpreting its NMEA messages.

<p align="center">
<a href="https://github.com/107-systems/107-Arduino-Viper"><img src="extras/logo/viper-logo.jpg" width="40%"></a>
</p>

Arduino library for interfacing with the PA1010D GPS module (MTK3333 chipset) and interpreting its NMEA messages.
## Example
```C++
#include <ArduinoNmeaParser.h>
/* ... */
void onPositionUpdate(float const last_fix_utc_s, float const latitude, float const longitude, float const speed, float const course)
{
char msg[64] = {0};
snprintf(msg, 64, "[%f] %f LON | %f LAT | %d m/s | %d °", last_fix_utc_s, latitude, longitude, speed, course);
Serial.println(msg);
}
/* ... */
ArduinoNmeaParser parser(onPositionUpdate);
/* ... */
void setup() {
Serial.begin(9600);
Serial1.begin(9600);
}
/* ... */
void loop() {
while (Serial1.available()) {
parser.encode((char)Serial1.read());
}
}
```
26 changes: 26 additions & 0 deletions keywords.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#######################################
# Syntax Coloring Map for 107-Arduino-NMEA-Parser
#######################################

#######################################
# Class (KEYWORD1)
#######################################

ArduinoNmeaParser KEYWORD1
Error KEYWORD1

#######################################
# Methods and Functions (KEYWORD2)
#######################################

encode KEYWORD2
clearerr KEYWORD2
error KEYWORD2

#######################################
# Constants (LITERAL1)
#######################################

None LITERAL1
Checksum LITERAL1
RMC LITERAL1

0 comments on commit 100765f

Please sign in to comment.