Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update GPS.ino #7

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Update GPS.ino
/********* don't use restricted name like serial****/
/****** prevents compilation problems ********/
mhjxs4all authored Aug 27, 2018

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit ee79062a62a8c4d81d266c470d3240fc9782d6e5
10 changes: 6 additions & 4 deletions GPS/GPS.ino
Original file line number Diff line number Diff line change
@@ -4,13 +4,15 @@

#include <TinyGPS++.h>

TinyGPSPlus gps;
HardwareSerial Serial1(1);
TinyGPSPlus gps;
/********* don't use restricted name like serial****/
/****** prevents compilation problems ********/
HardwareSerial GPSSerial1(1);

void setup()
{
Serial.begin(115200);
Serial1.begin(9600, SERIAL_8N1, 12, 15); //17-TX 18-RX
GPSSerial1.begin(9600, SERIAL_8N1, 12, 15); //17-TX 18-RX
}

void loop()
@@ -43,7 +45,7 @@ static void smartDelay(unsigned long ms)
unsigned long start = millis();
do
{
while (Serial1.available())
while (GPSSerial1.available())
gps.encode(Serial1.read());
} while (millis() - start < ms);
}