Open javiisanchez opened 6 years ago
The problem is that your define ESP32_TTGO is probably locally defined, so when SX1272.cpp is compiled, the define statement is not declared, so not assumed to be not defined. It is better to use the setCSPin() function as in this example: https://github.com/CongducPham/LowCostLoRaGw/blob/75d3bbb597339f1ccdd6ecb0422236a4d3999b7d/Arduino/Arduino_LoRa_Ping_Pong_LCD/Arduino_LoRa_Ping_Pong_LCD.ino#L227
Get the latest Arduino/sketch/libraries/SX1272 lib
Yes, I also have tried to add this line, but it follow unrecongnizing the transeiver. (without modifying the SX1272.h
#ifdef ESP32_TTGO
PRINT_CSTSTR("%s","ESP32 detected\n");
sx1272.setCSPin(18);
#endif
// Power ON the module
sx1272.ON();
Also, we have tried to define ESP32_TTGO gloablly. but it doesn't work.
In addition to that, our RSET pin it also different... I understand that it will also have to be defined in the code no?
So, check again the connection. I don't see what can be the other alternatives. The RST pin is not used.
regards,
We can check the connections but the connections it was made at the PCB of the ESP32 who we can see in the following picture:
I don't see the MISO pin, maybe you inverted MOSI and MISO?
Yes in the picture doesn't specify the MISO pin, surely its a error. The MISO is pin 19 and the MOSI the 27. what pins do you define or configure by default?
These pins are defined by the board, so we are not re-defined them, only CS can be "user" defined. I don't have any answer, maybe a hardware issue, can you try with another board?
Yes I can check with other device. Now, I'm verify the hardware and this is the finally schematic:
Hi, after trying different solutions we have aaccomplished. We have modified the ON() method in SX1272.cpp, we have changed the SPI.begin() by SPI.begin(SX1276_SCK, SX1276_MISO, SX1276_MOSI, SX1276_SS); SCK--5 RST--14 CS--18 MOSI--27 MISO--19
//Configure the MISO, MOSI, CS, SPCR.
#ifdef ESP32_TTGO
SPI.begin(SX1276_SCK, SX1276_MISO, SX1276_MOSI, SX1276_SS);
#else
SPI.begin();
#endif
if you want we can do a commit to add this board to the framework. (It we also have added the LCD of the board in the ping_pong_LCD)
Thanks.
Thank you. I guess it is because the Arduino IDE does not have the TTGO board variant definition so the pins_arduino.h file is not defined for this board. I found this githhub that seems to be for the TTGO board: https://github.com/CaptIgmu/Arduino/tree/master/esp32/TTGO_LoRa32_OLED
Maybe this can be a solution to support the board. As you can see the board.txt file defines the board as ARDUINO_TTGO_LoRa_32.
Hi, we are trying to use 868 MHz MHz SX1276 ESP32 Lora to send message to gateway installed in a raspberrypi with Draguino. The gateway reconize the transeiver and work fine. The problem appears when we try to initialize the transceiver as it doesn't recognize it. For exemple we are trying this code:
and in the SX1272.h we have added;
Can you help us? Our transeiver use the followinf SPI pins: SCK--5 RST--14 CS--18 MOSI--27 MISO--19 IRQ--26
Thanks in advance.