Software serial pins on Feather Huzzah

I have been trying to figure out and work the examples for the GPS and softwareserial.
A lot of my confusion and trouble has to do with all the pictures of the Feather Huzzah pinouts.
The boards are marked 14, 12, 8, 5, 0, etc. on one side and some of the examples ask that I wire the tx and rx to pins 7 and 8.

I cant figure out how to equate what the SoftwareSerial command wants as relating to the pin number on the board.

Here is the code from an example:

// you can change the pin numbers to match your wiring:
SoftwareSerial mySerial(8, 7);
Adafruit_GPS GPS(&mySerial);

So what physical pins equate to 8 and 7 and what reference did you use to figure it out.
Please keep it simple for my block head.

thanks

Are you working with a full set of documentation for the Feather Huzzah? Such a simple thing as the pinout will be documented, without a doubt.

Where did you get the pictures you're talking about? Can you provide a link?

Also, you cheated yourself out of some help with your thread title. You should change it to something like "software serial pins on Feather Huzzah" so people who have some experience with that will see it right away.

I don't have a Feather Huzzah, but I do have various other boards based on the ESP8266. I tried software serial on them when I first got them and came to realise it doesn't work well. My understanding is that the interrupts needed to drive the WiFi interfere with the software serial timing. If this is not correct I'd be happy for someone to correct me, but at the moment I think you are wasting your time trying to get SWS working on an ESP8266 based board.

This is one of the pictures that I was looking at.

And I am hopeless at trying to get the picture into a post.

How to post an image

[EDIT]
I downloaded your image but can't open the file. As you see it is not displaying here either. I suspect there is something wrong with the file.

aarg:
Are you working with a full set of documentation for the Feather Huzzah? Such a simple thing as the pinout will be documented, without a doubt.

Where did you get the pictures you're talking about? Can you provide a link?

Also, you cheated yourself out of some help with your thread title. You should change it to something like "software serial pins on Feather Huzzah" so people who have some experience with that will see it right away.

I looked at the adafruit documentation for the board and the pin out decriptions dont help me.
Here is a link to the subject and I defy you to tell me what are SoftwareSerial 7 and 8.
Feather Huzzah pinout

PerryBebbington:
I don't have a Feather Huzzah, but I do have various other boards based on the ESP8266. I tried software serial on them when I first got them and came to realise it doesn't work well. My understanding is that the interrupts needed to drive the WiFi interfere with the software serial timing. If this is not correct I'd be happy for someone to correct me, but at the moment I think you are wasting your time trying to get SWS working on an ESP8266 based board.

Yikes !!

Here is a link to the subject and I defy you to tell me what are SoftwareSerial 7 and 8.

What makes you think that a pin out diagram would show the pins used for software serial? Software serial is, er, software, there's a clue in the first word. Software doesn't have a specific pin allocated in the hardware, they are allocated in the software, perhaps as part of setup. In the case of software serial you do exactly that, you tell it in setup which pins to use. So, you can defy anyone you like to find the pins on that diagram, they won't find them because they are not there to be found.

I think you are getting confused with:

Serial.swap();

Which moves the ESP8266's only useable serial port on to GPIO 13 (Rx) and GPIO 15 (Tx), also, confusingly designated as pins 7 (Rx) and 8 (Tx).

PerryBebbington:
What makes you think that a pin out diagram would show the pins used for software serial? Software serial is, er, software, there's a clue in the first word. Software doesn't have a specific pin allocated in the hardware, they are allocated in the software, perhaps as part of setup. In the case of software serial you do exactly that, you tell it in setup which pins to use.

Thank you Perry, it is slowly becoming clearer, though.....in my example from above which sets software serial pins 7 and 8, what the heck are those pins on the board ?
I think that it is one of the GPIO pins, but which ones ???
They are numbered 0,1 2,3,4,5,12,13,14,15,16.
I am gonna try 12 and 13 just for grins.

I am gonna try 12 and 13 just for grins.

so you are going to change the declaration to

// you can change the pin numbers to match your wiring:
SoftwareSerial mySerial(13, 12);
Adafruit_GPS GPS(&mySerial);

My understanding is that the interrupts needed to drive the WiFi interfere with the software serial timing.

That is very possible, though lower baudrates should be ok, and if you don't use the wifi the problem should not occur.

What is there to stop you from using the hwSerial ?
Adafruit_GPS GPS(&Serial); or the alternate pins ?

Try 13 and 15, I don't know which way round, try both ways. D7 and D8 on the board.

PerryBebbington:
Try 13 and 15, I don't know which way round, try both ways. D7 and D8 on the board.

Not on this one, here they are just marked 13 & 15 (RX & TX)

hextejas,
Please, when you finally find out which of the contradictory and confusing suggestions you have been given actually works then report here what the correct information is so that someone reading this in future can find out.

I thank you.

contradictory and confusing suggestions

Yes my apologies for that. From the picture i know the pin numbers given in the pinout image i know that the numbers on the board (of the picture that you posted) actually correspond with the GPIO numbers (unlike on a nodeMCU which uses a second set of numbers to confuse us, even beyond their board) and that you can reference directly by it's pinnr (in softSerial() and digitalWrite() etc)
The UART pins are 3 & 1 for the primary port connected to the USB port of which the RX pin is 5vTolerant (it says so right there in the picture) so you could connect RX & TX there referencing the Serial object to the Adafruit_GPS GPS(&Serial); to the GPS library. Or you could connect to pins 13 & 15 (RX, TX), the alternate hwSerial port, you could reference it the same way to the GPS but would have to call Serial.swap(); the connect to it afterwards, and then you would have to use a voltage divider or converter on pin 13, because that pin is not 5v tolerant.
Or if you need the hwSerial port for anything else you could consider trying softwareSerial using a pins of your choice, though maybe not any of the UART pins and use a voltage divider on the RX pin. Declare the swSerial object (RX,TX) as it was. Part of the confusion is caused by the huzzah not having pin 7 & 8 connected (and pin D7 & D8 on a nodeMCU are pins 13 &15, maybe ? ) and this example was written for a different board.

I might be about to give up on this platform and look for an alternative. From my 30+ years of writing code I always worked under the assumption that when code produced different results you searched for the reason.
Well, in this case here, the example should not work correctly yet it does.
For the background.
I was trying to make an Adafruit ultimate GPS board work with a Feather Huzzah using SoftwareSerial, and I tried to break it down into simple bites (bytes, :slight_smile: ). I was using the example programs and working with them.
For the record, the example programs for the GPS and SoftwareSerial need to be made much simpler.
Onward:
This is the example program that I now have working. I dont remember exactly where I got it. :confused:

//Make sure to install the adafruit GPS library from https://github.com/adafruit/Adafruit-GPS-Library
#include <Adafruit_GPS.h> //Load the GPS Library. Make sure you have installed the library form the adafruit site above
#include <SoftwareSerial.h> //Load the Software Serial Library. This library in effect gives the arduino additional serial ports

SoftwareSerial mySerial(12, 13); //Initialize SoftwareSerial, and tell it you will be connecting through pins 12 and 13

Adafruit_GPS GPS(&mySerial); //Create GPS object
 
String NMEA1;  //We will use this variable to hold our first NMEA sentence
String NMEA2;  //We will use this variable to hold our second NMEA sentence
char c;       //Used to read the characters spewing from the GPS module
 
void setup()  
{
  Serial.begin(115200);  //Turn on the Serial Monitor
  Serial.println("      ");
  Serial.println(" I am here ");
  GPS.begin(9600);       //Turn GPS on at baud rate of 9600
  GPS.sendCommand("$PGCMD,33,0*6D"); // Turn Off GPS Antenna Update
  GPS.sendCommand(PMTK_SET_NMEA_OUTPUT_RMCGGA); //Tell GPS we want only $GPRMC and $GPGGA NMEA sentences
  GPS.sendCommand(PMTK_SET_NMEA_UPDATE_1HZ);   // 1 Hz update rate
  delay(1000);  //Pause
  Serial.println("      ");
  Serial.println(" I am after the pause ");
}
 
 
void loop()                     // run over and over again
 {
  Serial.println("      ");
  Serial.println(" I am before readgps ");
  
  readGPS();  //This is a function we define below which reads two NMEA sentences from GPS
 
 Serial.println("      ");
 Serial.println(" I am after readGPS ");
}
void readGPS()
{  
  //This function will read and remember two NMEA sentences from GPS
  clearGPS();    //Serial port probably has old or corrupt data, so begin by clearing it all out
  while(!GPS.newNMEAreceived()) { //Keep reading characters in this loop until a good NMEA sentence is received
  c=GPS.read(); //read a character from the GPS
  }
  /* Serial.println(" I am here 2"); */
GPS.parse(GPS.lastNMEA());  //Once you get a good NMEA, parse it
NMEA1=GPS.lastNMEA();      //Once parsed, save NMEA sentence into NMEA1
while(!GPS.newNMEAreceived()) {  //Go out and get the second NMEA sentence, should be different type than the first one read above.
  c=GPS.read();
  }
GPS.parse(GPS.lastNMEA());
NMEA2=GPS.lastNMEA();
  Serial.println(NMEA1);
  Serial.println(NMEA2);
  Serial.println("");
}
void clearGPS() {  //Since between GPS reads, we still have data streaming in, we need to clear the old data by reading a few sentences, and discarding these
while(!GPS.newNMEAreceived()) {
  c=GPS.read();
  }
GPS.parse(GPS.lastNMEA());
while(!GPS.newNMEAreceived()) {
  c=GPS.read();
  }
GPS.parse(GPS.lastNMEA());
 
}

You will note from this statement
SoftwareSerial mySerial(12, 13); //Initialize SoftwareSerial, and tell it you will be connecting through pins 12 and 13
that the code should be using pin numbers 12 and 13. In fact the wiring has the GPS connected to pins 12 and 14 and yet it works as this output shows. The various comments are intended for me to try and trace what the code is doing. When I actually hook it up to pins 12 and 13 it doesnt work !

10:02:40.001 ->  I am here 
10:02:41.126 ->       
10:02:41.126 ->  I am after the pause 
10:02:41.126 ->       
10:02:41.126 ->  I am before readgps 
10:02:41.821 -> $PMTK001,220,3*30
10:02:41.821 -> 
10:02:41.821 -> $GPGGA,235$GPGGA,235948.799,,,,,0,00,,,M,,M,,*7E
10:02:41.821 -> 
10:02:41.821 -> 
10:02:41.821 ->       
10:02:41.821 ->  I am after readGPS 
10:02:41.821 ->       
10:02:41.821 ->  I am before readgps 
10:02:43.841 -> $GPRMC,235949.799,V,,,,,0.00,0.00,050180,,,N*46
10:02:43.841 -> 
10:02:43.841 -> $GPGGA,235950.800,,,,,0,00,,,M,,M,,*78
10:02:43.841 ->

SHEESH!!! >:( >:( >:(

In fact the wiring has the GPS connected to pins 12 and 14 and yet it works as this output shows. The various comments are intended for me to try and trace what the code is doing. When I actually hook it up to pins 12 and 13 it doesnt work !

That must be an issue related to the ESP-core and the huzzah board you are using. We don't have the board you have (at least i don't) and rely on the documentation provided.

For the record, the example programs for the GPS and SoftwareSerial need to be made much simpler.
Onward:

For that you can contact adafruit, though they provide the libary free of charge, and the softwareSerial examples are not created for your board specifically.
But great you got it working, Definitely add [solved] to your topic name, and maybe you can actually workout why the pin numbers do not correspond and what they should be using trial and error. (or wheather this is just an issue relating to softwareSerial.h in the ESP-core ? )