LILYGO T3 V1.6.1 LORA problem.

espwire
Posts: 1
Joined: Tue May 09, 2023 6:49 pm

LILYGO T3 V1.6.1 LORA problem.

Postby espwire » Tue May 09, 2023 7:05 pm

Hi.
I have a question about the LORA module with LILYGO ver. T3 V1.6.1.
I cannot get LORA to work.
On the board I have esp version ESP32-PICO-D4.

Below I paste the connections from datasheet T3 V1.6.1 between esp and lora:
IO23=RESET
IO18=NSS/SEL
IO5=SCK
IO27=MOSI/SDI
IO19=MISO/SDO
IO26=DI0/IO0

Here I am attaching the pinout of the esp modules:
IO18=PIN 35
IO23=PIN 36
IO26=PIN 15
This is my code and the pins I have configured according to the documentation but it still doesn't work.
(Source: https://how2electronics.com/esp32-lora- ... -receiver/)
#include <Adafruit_GFX.h>
#include <LoRa.h>
#include <SPI.h>

#define ss 35
#define rst 36
#define dio0 15

int counter = 0;

void setup()
{
Serial.begin(9600);
while (!Serial)
;
Serial.println("LoRa Sender");

LoRa.setPins(ss, rst, dio0); // setup LoRa transceiver module

while (!LoRa.begin(433E6)) // 433E6 - Asia, 866E6 - Europe, 915E6 - North America
{
Serial.println(".");
delay(5000);
}
LoRa.setSyncWord(0xA5);
Serial.println("LoRa Initializing OK!");
}

void loop()
{
Serial.print("Sending packet: ");
Serial.println(counter);

LoRa.beginPacket(); // Send LoRa packet to receiver
LoRa.print("hello ");
LoRa.print(counter);
LoRa.endPacket();

counter++;

delay(10000);
}
The terminal gets it:
--- Terminal on COM3 | 9600 8-N-1
--- Available filters and text transformations: colorize, debug, default, direct, esp32_exception_decoder, hexlify, log2file, nocontrol, printable, send_on_enter, time
--- More details at https://bit.ly/pio-monitor-filters
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H
��␞J��]0N1-�m9␌)␀!��J��LoRa Sender
E (15) gpio: GPIO can only be used as input mode
[ 20][E][esp32-hal-gpio.c:130] __pinMode(): GPIO config failed
E (16) gpio: gpio_set_level(226): GPIO output gpio_num error
E (81) gpio: GPIO can only be used as input mode
[ 138][E][esp32-hal-gpio.c:130] __pinMode(): GPIO config failed
E (202) gpio: gpio_set_level(226): GPIO output gpio_num error
E (278) gpio: gpio_set_level(226): GPIO output gpio_num error
E (344) gpio: gpio_set_level(226): GPIO output gpio_num error
E (400) gpio: gpio_set_level(226): GPIO output gpio_num error

What am I doing wrong?
/Thanks.

lbernstone
Posts: 826
Joined: Mon Jul 22, 2019 3:20 pm

Re: LILYGO T3 V1.6.1 LORA problem.

Postby lbernstone » Thu May 11, 2023 5:06 pm

If the schematic/datasheet says that a lora function is attached to a esp pin on the pcb, that means there is a wire physically connecting them- you can't just redefine that.
pins >33 are input only, so you can't use them for something like a select or reset line (they can be used for MISO).

Who is online

Users browsing this forum: No registered users and 59 guests