Hello, I'm currently working for my model rocket project's avionic system. I've got a problem via communication with ground station. I've got Ebyte E220-900T30D LoRa module for transmit-recieve and I've got Adafruit Ultimate GPS for my positionining. When I try to use them both my LoRa module only transmits 1 data than stops. I think it is about using multiple UART comms but I don't knod the actual problem. I don't have any other problem but as I told you I need to use GPS and LoRa module at the same time.
// Raspberry Pi Pico RP2040 Serial1 test - for loopback test connect pins Rx GP1 and Tx GP0
// Note
// Serial is the USB serial for program loading and serial mointor
// there are two hardware serial ports UART0 and UART1
// Serial1 is mapped to UART0 on Rx pin GP1 Tx pin GP0
// Serial2 is mapped to UART1 on Rx pin GP5 Tx pin GP4
#include <Arduino.h>
void setup() {
// initialize both serial ports:
delay(5000);
Serial.begin(115200);
Serial1.begin(115200);
Serial.println();
Serial.println("\n\nRaspberry Pi Pico RP2040 Serial1 test Rx pin GP1 Tx pin GP0");
Serial.write(" for loopback test connect pin 0 to pin 1\n");
}
void loop() {
// read from port 1, send to port 0:
if (Serial1.available()) {
int inByte = Serial1.read();
//Serial.write('>');
Serial.write(inByte);
}
// read from port 0, send to port 1:
if (Serial.available()) {
int inByte = Serial.read();
//Serial.write(inByte);
Serial1.write(inByte);
}
}
test with RP2040 connected to an ESP32
RPi Pico serial test
RPi GP1 to ESP32 GPIO17
RPi GP0 to ESP32 GPIO16
Raspberry Pi Pico RP2040 Serial1 test Rx pin GP1 Tx pin GP0
for loopback test connect pin 0 to pin 1
hello from ESP32
ESP32 test 1234567890
ESP32 serial1 test Rx pin 16 Tx pin 17
for loopback test connect pin 16 to pin 17
hello from RPi Pico
RPi pico test 1234567
and Serial2 test code
// Raspberry Pi Pico RP2040 Serial2 test - for loopback test connect pins Tx GP4 and Rx GP5
#include <Arduino.h>
// Note
// Serial is the USB serial for program loading and serial mointor
// there are two hardware serial ports UART0 and UART1
// Serial1 is mapped to UART0 on Rx pin GP1 Tx pin GP0
// Serial2 is mapped to UART1 on Rx pin GP5 Tx pin GP4
void setup() {
// initialize both serial ports:
Serial.begin(115200);
delay(2000);
// reassign pin numbers for Serial1
Serial2.setTX(4); // note cannot swap pins
Serial2.setRX(5);
Serial2.begin(115200);
Serial.println("\n\nRaspberry Pi Pico RP2040 serial2 test Rx pin GP5 Tx pin GP4 ");
Serial.write(" for loopback test connect pin GP4 to pin GP5\n");
}
void loop() {
// read from port 1, send to port 0:
if (Serial2.available()) {
int inByte = Serial2.read();
Serial.write('>');
Serial.write(inByte);
}
// read from port 0, send to port 1:
if (Serial.available()) {
int inByte = Serial.read();
//Serial.write(inByte);
Serial2.write(inByte);
}
}
test both using loopback test then try connecting to the external devices
I'm using RP2040 Zero for my microcontroller so It is not a problem to use 2 serials at the same time. I just want the transmission will not stop when Sensor values changed. (Serial1 = AdaFruit Ultimate GPS - Serial2 = E22-900T30D LoRa Module)
While programming, yes I'm powering it from 5V IO pin (usb powered); but while using it normally, no. I'm using 8V battery - Regulator - Capacitor - 5V Output directly. I can't use 5V IO pin because while not using the usb RP2040 Zero needs to get his voltage from this pin and using 5V to power up the card
In the needed use I need to use it for 7-8 km usage. It is needed to use for Model Rocket project's telemetry system. So as I told you I can use it in 22dBm for now but In practice I need to use it for 30dBm. The modules are close to each other now.
I can minimum use 21dBm in parameter program so I can try on 21dBm
My parameters for transmit-recieve are looking like this (Adresses are different ofc)