GPS PA1010D with M0

GPS PA1010D UART M0

Use GPS module PA1010D with Arduino M0 (SAMD21G) to display GPS data.

Code

Download code
#define GPSSerial Serial1

void setup() {
  while (!SerialUSB) {}
  SerialUSB.begin(115200);
  GPSSerial.begin(9600);

  SerialUSB.println("Hello GPS");
}

void loop() {
  if (SerialUSB.available()) {
    char c = SerialUSB.read();
    GPSSerial.write(c);
  }
  if (GPSSerial.available()) {
    char c = GPSSerial.read();
    SerialUSB.write(c);
  }
}

Makefile

BOARD?=arduino:samd:mzero_bl
PORT := $(shell ls /dev/cu.usbmodem*)

.PHONY: default lint all flash clean

default: lint all flash clean

lint:
	cpplint --extensions=ino --filter=-legal/copyright *.ino

all:
	arduino-cli compile --fqbn $(BOARD) ./

flash:
	arduino-cli upload -p $(PORT) --fqbn $(BOARD) ./

clean:
	rm -f .*.bin
	rm -f .*.elf
	rm -f .*.hex

Serial console

Serial output from the firmware.

GPS PA1010D with M0 serial console

Prototype

A photo of the actual setup.

GPS PA1010D with M0 prototype

Schematic

Wire up the hardware accordingly

GPS PA1010D with M0 schematic

References