2026-01-26 10:46 PM
TL;DR: The receiver ESP32-LoRa node is showing garbage values instead of accelerometer values. The STM32 - LoRa sender node does read correct values from the MPU6050 sensor, as we confirmed that through PuTTY.
.ioc configuration
Context: So I am trying to program an STM32F411CEU6 module to read accelerometer values from MPU6050 (a 6-axis motion sensor). Then what I am trying to do is send those values to an ESP32 module. I am using Ra-02 SX1278 LoRa boards as the transceiver for the communication. We verified that the values were read properly by printing the MPU6050 sensor readings to the serial port. At the receiver end, we used Sandeep Mistry's LoRa.h library for programming the ESP32 in Arduino IDE. Clock Configuration for ref.
Issue: The receiver end was receiving garbage values when we tried to monitor the sent values. Even the code in void setup() was taking a while to execute. I believe the issue is with configuring the LoRa parameters between the sender and receiver nodes but I am not sure. The values were clearly visible at the sender node. We kept the same following configuration for LoRa at both the sender and receiver nodes:
The tech stack:
STM32CubeIDE for configuring UART, I2C, SPI (.ioc configs) and generating the code
FTDI USB to TTL converter for flashing the code to the board w/ STM32CubeProgrammer.
Sandeep Mistry LoRa.h library
Arduino IDE for programming ESP32-LoRa node