I am trying to hook up my STM32 Nucleo L432KC([NUCLEO-L432KC | Mbed] to my GPS GP-808G ([GPS Mouse - GP-808G Hookup Guide - SparkFun Learn].
This example has something for Arduino which I tested on my Arduino device successfully. I have tried doing this on PlatformIO with my Nucleo board, and I did get output for a second but thats it. I tried many configurations for hours and hours, but I cannot get it to receive a reliable output flow of data. I tried the TinyGPS++ Library but at this point I just want to receive basic output only and that is not working. I have wired up the RX to pin DO and TX to D1 in my nucleo board. Here is the code I am trying to run:
#include <Arduino.h>
#define ss Serial2 // Use hardware Serial2 (PA10 RX, PA9 TX)
void setup() {
Serial.begin(115200);
ss.begin(9600);
Serial.println("✅ Serial2 GPS Debugging Test - Waiting for data...");
}
void loop() {
if (ss.available()) {
char c = ss.read();
Serial.write(c); // Print GPS data to Serial Monitor
}
}
here is my INI file:
[env:nucleo_l432kc]
platform = ststm32
board = nucleo_l432kc
framework = arduino
upload_protocol = stlink
monitor_port = COM2
monitor_flags = --raw
monitor_speed = 115200
lib_deps =
Wire
mikalhart/TinyGPSPlus@^1.1.0
build_flags =
-D PIO_FRAMEWORK_ARDUINO_ENABLE_HWSERIAL2
I have images of my schematic and devices below:
Any help would be appreciated!