Home › Forums › Mayfly Data Logger › Bringing in serial data through UART on 20-Pin connector › Reply To: Bringing in serial data through UART on 20-Pin connector
I’m just seconding what Shannon said about using the hardware UART – always use hardware UART unless you definitely cannot. In your case where you’ll be parsing long NMEA sentences, I’d recommend actually re-wiring your Bee/modem to give your GPS the better connection if you’re trying to use both. In your code, you just use “Serial1” to communicate over the RX1/TX1 exactly like you would use “Serial” when writing to the computer. AltSoftSerial is the next best alternative – on the Mayfly with AltSS Rx will be on pin 6 and Tx on pin 5 (and only those pins). Like Shannon said, you can use any pin that allows pin-change interrupts for SoftwareSerial (which is nearly any digital pin on the Mayfly) but you are more likely to have misread data using it.