From a4a1507a6338b162518ac533b6b7a4df109fe1a6 Mon Sep 17 00:00:00 2001 From: Konstantinos Kamaropoulos Date: Thu, 9 Jan 2020 22:26:09 +0200 Subject: [PATCH] feat: Read NMEA sentences from GPS module --- Aiolos_Drone.ino | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Aiolos_Drone.ino b/Aiolos_Drone.ino index 7d68379..4316ecb 100644 --- a/Aiolos_Drone.ino +++ b/Aiolos_Drone.ino @@ -8,7 +8,6 @@ int MQ9 = A6; int MQ135 = A7; void setup() { - pinMode(MQ2, INPUT); pinMode(MQ4, INPUT); pinMode(MQ5, INPUT); @@ -18,6 +17,7 @@ void setup() { pinMode(MQ9, INPUT); pinMode(MQ135, INPUT); Serial.begin(9600); + Serial3.begin(9600); } void loop() { @@ -52,4 +52,9 @@ void loop() { Serial.println("\n"); } } + + while (Serial3.available() > 0){ + byte gpsData = Serial3.read(); + Serial.write(gpsData); + } }