Post topics, source code that relate to the Arduino Platform

User avatar
By Duane J
#20410 I have an MTK3339 (G.top010) GPS [1] that I'm trying to connect to the esp8266. It uses a serial bus to communicate its coordinates.

I'd like to be able to listen to the serial data from the GPS, and send it back to my laptop via Serial Monitor--in other words, I have two simultaneous serial connections going on in the main loop. From what I've seen, this is fairly simple [2] with the SoftwareSerial library on a regular Arduino mcu:

Code: Select all#include <SoftwareSerial.h>
 
SoftwareSerial GPS(3, 1); // RX, TX
 
void setup() 
{
  Serial.begin(115200);
  while (!Serial) { }
  GPS.begin(9600);
}
 
void loop()
{
  if (GPS.available())
  {
    Serial.write(GPS.read());
  }
}


AFAICT, there is no analogous SoftwareSerial library available for the esp8266? Lacking that, I tried a hardware serial with "Serial.swap()" in the main loop, hoping I could read on one pair of pins (13, 15) and read/write on another (3, 1). So far, no dice (it freezes up after several loops).

Are there any libraries that could help me accomplish this dual serial comms task? Any other approaches I could consider?

Thanks,
Duane

[1] http://www.aliexpress.com/item/Gms-hpr- ... 92334.html
[2] http://www.jarzebski.pl/arduino/kompone ... eo6-m.html
User avatar
By ricg
#20561 It sounds like you want to send gps data back to a pc via an esp8266 ?
if you plan to use an arduino it will need to read the gps data and send it to a esp ( connected to your wifi ). It would then be recv'd by a program listening on a specified port on the PC.
Is that what you have in mind?