rgot-org / TheThingsNetwork_esp32

82 stars 24 forks source link

LORA_IO0/1/2 was not declared in this scope #18

Closed martin3000 closed 3 years ago

martin3000 commented 3 years ago

I'm using the board "TTGO LoRa32-OLED V1". In the code is "ttn.begin(SS, LMIC_UNUSED_PIN, RST_LoRa, DIO0,DIO1,DIO2);"

When compiling, I get the error:

/home/jms/Arduino/libraries/TTN_esp32/src/lmic/hal/getpinmap_ttgo_TBEAM.cpp:38:21: error: 'LORA_IO0' was not declared in this scope:   PIN_SX1276_DIO0 = LORA_IO0,
/home/jms/Arduino/libraries/TTN_esp32/src/lmic/hal/getpinmap_ttgo_TBEAM.cpp:39:21: error: 'LORA_IO1' was not declared in this scope:    PIN_SX1276_DIO1 = LORA_IO1,
/home/jms/Arduino/libraries/TTN_esp32/src/lmic/hal/getpinmap_ttgo_TBEAM.cpp:40:21: error: 'LORA_IO2' was not declared in this scope:    PIN_SX1276_DIO2 = LORA_IO2,

I tried to use

#define LORA_IO0 26
#define LORA_IO1 33
#define LORA_IO2 32

but that did not help. I guess for this board, the 3 constants are not defined in the espressif headers. Using the board "Heltec Wifi LoRa 32" it works, but then I have wrong assignments.

rgot-org commented 3 years ago

i have updated the library, please download the repository as zip file then reinstall library from zip.

martin3000 commented 3 years ago

Works fine, thank you!

richardjlyon commented 3 years ago

I'm on version 0.1.1 and still have this issue with board ttgo-lora32-v1