-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LILYGO® TTGO LORA32 868/915Mhz ESP32 LoRa OLED - pinouts #16
Comments
You might want to check if https://github.com/matthias-bs/BresserWeatherSensorReceiver/tree/main/examples/BresserWeatherSensorMQTTCustom/src works for you. In this example, the library part is placed in the sub-directory /src of the sketch. In there is the file WeatherSensorCfg.h where you can define the pins as needed. I also recommend to enable debug output by uncommenting
at the beginning. Please try the latest version of the repository instead of any of the releases. Let me now if the compilation still fails and provide a log file. I just tried to compile for the targets TTGO LoRa32-OLED V1 and TTGO LoRa32-OLED V2.1.6 - both worked. |
What is the difference between the SX1276 and the SX1278?
But RadioLib also provides SX1278 support. |
As far as I can see from https://www.semtech.com/products/wireless-rf/lora-connect, SX1278 is for 137MHz to 525MHz, while SX1276 for 137MHz to 1020MHz. |
Relation between SX1278 and SX1276 module classes in RadioLib: Here is an example of the RadioLib Module constructor which has to be used if an alternative SPI port has to be used: SPI port config: |
The Arduino Board Manager for V2 arduino-esp32/pins_arduino.h at master · espressif/arduino-esp32 (github.com)<https://github.com/espressif/arduino-esp32/blob/master/variants/ttgo-lora32-v2/pins_arduino.h>
Has this which doesn’t help
// SPI LoRa Radio
#define LORA_SCK 5 // GPIO5 - SX1276 SCK
#define LORA_MISO 19 // GPIO19 - SX1276 MISO
#define LORA_MOSI 27 // GPIO27 - SX1276 MOSI
#define LORA_CS 18 // GPIO18 - SX1276 CS
#define LORA_RST 12 // GPIO14 - SX1276 RST
#define LORA_IRQ 26 // GPIO26 - SX1276 IRQ (interrupt request)
And V2.1
arduino-esp32/pins_arduino.h at master · espressif/arduino-esp32 (github.com)<https://github.com/espressif/arduino-esp32/blob/master/variants/ttgo-lora32-v21new/pins_arduino.h>
// SPI LoRa Radio
#define LORA_SCK 5 // GPIO5 - SX1276 SCK
#define LORA_MISO 19 // GPIO19 - SX1276 MISO
#define LORA_MOSI 27 // GPIO27 - SX1276 MOSI
#define LORA_CS 18 // GPIO18 - SX1276 CS
#define LORA_RST 23 // GPIO23 - SX1276 RST
#define LORA_IRQ 26 // GPIO26 - SX1276 IRQ (interrupt request)
#define LORA_D1 33 // GPIO33 - SX1276 IO1 (for LMIC Arduino library)
#define LORA_D2 32 // GPIO32 - SX1276 IO2
V1
// SPI LoRa Radio
#define LORA_SCK 5 // GPIO5 - SX1276 SCK
#define LORA_MISO 19 // GPIO19 - SX1276 MISO
#define LORA_MOSI 27 // GPIO27 - SX1276 MOSI
#define LORA_CS 18 // GPIO18 - SX1276 CS
#define LORA_RST 14 // GPIO14 - SX1276 RST
#define LORA_IRQ 26 // GPIO26 - SX1276 IRQ (interrupt request)
Mine appears to be a V1 and the G1 isn’t connected to the ESP32
Regards,
Phil
From: Matthias ***@***.***>
Sent: 02 November 2022 18:24
To: ***@***.***>
Cc: ***@***.***>; ***@***.***>
Subject: Re: [matthias-bs/BresserWeatherSensorReceiver] LILYGO® TTGO LORA32 868/915Mhz ESP32 LoRa OLED - pinouts (Issue #16)
Relation between SX1278 and SX1276 module classes in RadioLib:
https://jgromes.github.io/RadioLib/class_physical_layer.html<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fjgromes.github.io%2FRadioLib%2Fclass_physical_layer.html&data=05%7C01%7C%7C2b88a31e99024b517a5d08dabcff6f11%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638030102499402460%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=uWLXMkm8E0w5e0%2FLgVM1ZtCcvXYu2E0CcF8q5iJlYqM%3D&reserved=0>
So it might work without any modifications...
—
Reply to this email directly, view it on GitHub<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmatthias-bs%2FBresserWeatherSensorReceiver%2Fissues%2F16%23issuecomment-1301047152&data=05%7C01%7C%7C2b88a31e99024b517a5d08dabcff6f11%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638030102499402460%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=cuo%2ByLHtEvOSLqRRVPS5sayVcKlsMsUhfTTaLGgiUYA%3D&reserved=0>, or unsubscribe<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAI5KPM2IVWOISE2ZB6UBWRLWGKWURANCNFSM6AAAAAARVHHH3Y&data=05%7C01%7C%7C2b88a31e99024b517a5d08dabcff6f11%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638030102499402460%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=5c1BO2XCXS0vj%2Fasi4Z4%2FIpYBZTJLqP6WKY9VnW%2BINs%3D&reserved=0>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
What is G1? And what is actually the problem? Best regards, |
I don’t know but it’s in WeatherSensorCfg.h
// CC1101: GDO2 / RFM95W/SX127x: G1
#define PIN_RECEIVER_GPIO 33
I can’t get the custom version to compile loads of compile errors like this
undefined reference to `RainGauge::update(tm, float, float)'
With the MQTT version with debug turned on this is all I get
rst:0x1 (POWERON_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1184
load:0x40078000,len:13160
load:0x40080400,len:3036
entry 0x400805e4
BresserWeatherSensorMQTT 20221006
Attempting to connect to SSID: pkm-24m.connected!
Checking wifi...
MQTT connecting... connected!
ESPWeather/status: online
And MQTT explorer shows
ESPWeather/status “online”
And about 20 seconds later
ESPWeather/status “dead”
Giving up for today...
Regards,
Phil
From: Matthias ***@***.***>
Sent: 02 November 2022 21:15
To: ***@***.***>
Cc: ***@***.***>; ***@***.***>
Subject: Re: [matthias-bs/BresserWeatherSensorReceiver] LILYGO® TTGO LORA32 868/915Mhz ESP32 LoRa OLED - pinouts (Issue #16)
What is G1? And what is actually the problem?
I think you could create an SPI object with your SPI pins and pass this together with the other pins to the Module constructor.
Best regards,
Matthias
—
Reply to this email directly, view it on GitHub<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmatthias-bs%2FBresserWeatherSensorReceiver%2Fissues%2F16%23issuecomment-1301275948&data=05%7C01%7C%7Ced86751c559847d5e35508dabd174fcb%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638030205063529550%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=SgkTet6TQbUd10N8PtLh2y3x5gEK8Y2KN1%2F5IvIF48I%3D&reserved=0>, or unsubscribe<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAI5KPM6B4OKIEQQQJPFCQVDWGLKVRANCNFSM6AAAAAARVHHH3Y&data=05%7C01%7C%7Ced86751c559847d5e35508dabd174fcb%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638030205063685787%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=00YHvGXLdZ33QmHLeVVH3qiFjajQPUOR8Uzua1DxWiM%3D&reserved=0>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Hi @pmknowles , // Use pinning for LoRaWAN Node #elif defined(ESP32)
At my side it is working with that settings |
Afraid that didn’t work. I’m pretty sure the ESP32 isn’t talking to the SX1276. The debug output stops after the first MQTT message saying online. No more output. The MQTT message changes to dead 18 seconds later.
I’ve deleted the Library and re-installed. I now can compile the Basic version but if I try to change anything (like turn on debugging or set fixedpoint rather than having both fixed and floating in refuses to compile.
I’m going to try to implement a Lora transmit and receive to an RFM95W that I have to confirm I can communicate to the SX1276. That will need to wait until the weekend.
Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows
From: ***@***.***>
Sent: 03 November 2022 10:48
To: ***@***.***>
Cc: ***@***.***>; ***@***.***>
Subject: Re: [matthias-bs/BresserWeatherSensorReceiver] LILYGO® TTGO LORA32 868/915Mhz ESP32 LoRa OLED - pinouts (Issue #16)
Hi @pmknowles<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fpmknowles&data=05%7C01%7C%7Cf6a78af29c4d419972c608dabd88ecfc%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638030693026775478%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=50tSgvhBSyR%2BIoCRS2adZ0BNaciQXq9Np0TwRHZN4AY%3D&reserved=0> ,
try in WeatherSensorCfg.h with:
// Use pinning for LoRaWAN Node
//#define LORAWAN_NODE
#elif defined(ESP32)
#define PIN_RECEIVER_CS 18
// CC1101: GDO0 / RFM95W/SX127x: G0
#define PIN_RECEIVER_IRQ 26
// CC1101: GDO2 / RFM95W/SX127x: G1
#define PIN_RECEIVER_GPIO 33
// RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
#define PIN_RECEIVER_RST 23
At my side it is working with that settings
—
Reply to this email directly, view it on GitHub<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmatthias-bs%2FBresserWeatherSensorReceiver%2Fissues%2F16%23issuecomment-1301920719&data=05%7C01%7C%7Cf6a78af29c4d419972c608dabd88ecfc%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638030693026775478%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=sYbKscf0Q6Z8GJa5uvGM%2FUm94eFZux3sdQqys4ZMwAM%3D&reserved=0>, or unsubscribe<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAI5KPMYUU46ADJKFLSBUEUTWGOJ7LANCNFSM6AAAAAARVHHH3Y&data=05%7C01%7C%7Cf6a78af29c4d419972c608dabd88ecfc%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638030693026775478%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=%2Bx9clpVhPfAA9nw1yJ77%2BbaJhp37%2FKH%2Fg0gUZbYUxAo%3D&reserved=0>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
So I’ve had a bit of time. Using the Random Nerds Tutorial for the TTGO LoRa32 SX1276 I can transmit from a ESP32 with an RFM95W to the TTGO. The pins are compared with the pins in WeatherSensorCfg.h
RandomNerds Bresser
#define SCK 5 D18
#define MISO 19 D19
#define MOSI 27 D23
#define SS 18 D27
#define RST 14 D32
#define DIO0 26 D21
I can obviously change the pins for the last 3 but the first 3 are in the board library. The board library has the following in pins.h for the board
// SPI LoRa Radio
#define LORA_SCK 5 // GPIO5 - SX1276 SCK
#define LORA_MISO 19 // GPIO19 - SX1276 MISO
#define LORA_MOSI 27 // GPIO27 - SX1276 MOSI
#define LORA_CS 18 // GPIO18 - SX1276 CS
#define LORA_RST 14 // GPIO14 - SX1276 RST
#define LORA_IRQ 26 // GPIO26 - SX1276 IRQ (interrupt request)
I can’t see where the code uses the ‘default’ pins so I presume that the code will use the pins from pins.h. It may be that I am doing something wrong in compiling (a strong possibility). I’m going to delete the library and restart following the issue instructions again.
Still no joy even in debug mode I get no output after the first MQTT statement so I suspect that it’s not talking to the SX1276
Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows
From: ***@***.***>
Sent: 03 November 2022 10:48
To: ***@***.***>
Cc: ***@***.***>; ***@***.***>
Subject: Re: [matthias-bs/BresserWeatherSensorReceiver] LILYGO® TTGO LORA32 868/915Mhz ESP32 LoRa OLED - pinouts (Issue #16)
Hi @pmknowles<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fpmknowles&data=05%7C01%7C%7Cf6a78af29c4d419972c608dabd88ecfc%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638030693026775478%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=50tSgvhBSyR%2BIoCRS2adZ0BNaciQXq9Np0TwRHZN4AY%3D&reserved=0> ,
try in WeatherSensorCfg.h with:
// Use pinning for LoRaWAN Node
//#define LORAWAN_NODE
#elif defined(ESP32)
#define PIN_RECEIVER_CS 18
// CC1101: GDO0 / RFM95W/SX127x: G0
#define PIN_RECEIVER_IRQ 26
// CC1101: GDO2 / RFM95W/SX127x: G1
#define PIN_RECEIVER_GPIO 33
// RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
#define PIN_RECEIVER_RST 23
At my side it is working with that settings
—
Reply to this email directly, view it on GitHub<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmatthias-bs%2FBresserWeatherSensorReceiver%2Fissues%2F16%23issuecomment-1301920719&data=05%7C01%7C%7Cf6a78af29c4d419972c608dabd88ecfc%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638030693026775478%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=sYbKscf0Q6Z8GJa5uvGM%2FUm94eFZux3sdQqys4ZMwAM%3D&reserved=0>, or unsubscribe<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAI5KPMYUU46ADJKFLSBUEUTWGOJ7LANCNFSM6AAAAAARVHHH3Y&data=05%7C01%7C%7Cf6a78af29c4d419972c608dabd88ecfc%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638030693026775478%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=%2Bx9clpVhPfAA9nw1yJ77%2BbaJhp37%2FKH%2Fg0gUZbYUxAo%3D&reserved=0>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Hi @pmknowles , can you share your WeatherSensorCfg.h that you are using? |
This is the version for my ESP dev board and the RFM95W
#if !defined(WEATHER_SENSOR_CFG_H)
#define WEATHER_SENSOR_CFG_H
// Number of sensors to be received
#define NUM_SENSORS 2
// Use pinning for LoRaWAN Node
//#define LORAWAN_NODE
#define ESP32
// List of sensor IDs to be excluded - can be empty
uint32_t const sensor_ids_exc[] = {};
//uint32_t const sensor_ids_exc[] = { 0x39582376 };
// List of sensor IDs to be included - if empty, handle all available sensors
uint32_t const sensor_ids_inc[] = {};
//uint32_t const sensor_ids_inc[] = { 0x83750871 };
// Select appropriate sensor message format(s)
#define BRESSER_5_IN_1
#define BRESSER_6_IN_1
// Select type of receiver module
//#define USE_CC1101
#define USE_SX1276
// Disable data type which will not be used to save RAM
#define WIND_DATA_FLOATINGPOINT
#define WIND_DATA_FIXEDPOINT
//#define _DEBUG_MODE_
// Arduino default SPI pins
//
// Board SCK MOSI MISO
// ESP8266 D5 D7 D6
// ESP32 D18 D23 D19
#if defined(LORAWAN_NODE)
#define PIN_RECEIVER_CS 14
// CC1101: GDO0 / RFM95W/SX127x: G0
#define PIN_RECEIVER_IRQ 4
// CC1101: GDO2 / RFM95W/SX127x: G1
#define PIN_RECEIVER_GPIO 16
// RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
#define PIN_RECEIVER_RST 12
#elif defined(ESP32)
#define PIN_RECEIVER_CS 27
// CC1101: GDO0 / RFM95W/SX127x: G0
#define PIN_RECEIVER_IRQ 21
// CC1101: GDO2 / RFM95W/SX127x: G1
#define PIN_RECEIVER_GPIO 33
// RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
#define PIN_RECEIVER_RST 32
#elif defined(ESP8266)
#define PIN_RECEIVER_CS 15
// CC1101: GDO0 / RFM95W/SX127x: G0
#define PIN_RECEIVER_IRQ 4
// CC1101: GDO2 / RFM95W/SX127x:
#define PIN_RECEIVER_GPIO 5
// RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
#define PIN_RECEIVER_RST 2
#endif
#endif
If I enable debug mode I still only get
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1344
load:0x40078000,len:13864
load:0x40080400,len:3608
entry 0x400805f0
BresserWeatherSensorMQTT 20221006
Attempting to connect to SSID: pkm-24m.connected!
Checking wifi...
MQTT connecting... connected!
ESPWeather-A1B1FC/status: online
Regards,
Phil
From: ***@***.***>
Sent: 03 November 2022 15:48
To: ***@***.***>
Cc: ***@***.***>; ***@***.***>
Subject: Re: [matthias-bs/BresserWeatherSensorReceiver] LILYGO® TTGO LORA32 868/915Mhz ESP32 LoRa OLED - pinouts (Issue #16)
Hi @pmknowles<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fpmknowles&data=05%7C01%7C%7C0f72956b5d714cad380e08dabdb2e835%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638030873343434531%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=yX5bqXyQONZay4u0dc7jrJf%2BevbuQyE5MuiQGGoVUfM%3D&reserved=0> , can you share your WeatherSensorCfg.h that you are using?
—
Reply to this email directly, view it on GitHub<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmatthias-bs%2FBresserWeatherSensorReceiver%2Fissues%2F16%23issuecomment-1302312492&data=05%7C01%7C%7C0f72956b5d714cad380e08dabdb2e835%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638030873343434531%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=FXez1%2Bqu8btki0QYgfkcOwfWWLF4QpQmF4h732NHPb4%3D&reserved=0>, or unsubscribe<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAI5KPMZ36FFEFJVH4UJJZJ3WGPNGHANCNFSM6AAAAAARVHHH3Y&data=05%7C01%7C%7C0f72956b5d714cad380e08dabdb2e835%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638030873343434531%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=8k8Z7GpRGVYONngEw2W93ZYF%2FFXWZQl1Nn%2BVblsVElU%3D&reserved=0>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Looks like you are using one of the old releases (instead of the HEAD of the repository). |
Hi @pmknowles , so we are now not talking about the TTGO anymore, right? |
Success!
{"id":"000000AF","ch":0,"battery_ok":1,"temp_c":4.1,"humidity":94,"wind_gust":3.0,"wind_avg":1.3,"wind_dir":292.5,"rain":88.8,"rain_d":0.0,"rain_w":0.0,"rain_m":0.0}
When I ran with serial monitor I got the message that the SX1276 was initialised which I wasn’t before.
This is the pinning for the TTGO LoRa OLED v1.0
#define SCK 5
#define MISO 19
#define MOSI 27
#define SS 18
#define RST 14
#define DIO0 26
Thank you for your help
Regards,
Phil
From: Matthias ***@***.***>
Sent: 03 November 2022 16:44
To: ***@***.***>
Cc: ***@***.***>; ***@***.***>
Subject: Re: [matthias-bs/BresserWeatherSensorReceiver] LILYGO® TTGO LORA32 868/915Mhz ESP32 LoRa OLED - pinouts (Issue #16)
Looks like you are using one of the old releases (instead of the HEAD of the repository).
I've created release v0.4.0 this morning. With this release it should be possible to compile all variants, enabling debug output should really give you debug output and the code should use the pins you actually define in your header file.
Please give it another try!
—
Reply to this email directly, view it on GitHub<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmatthias-bs%2FBresserWeatherSensorReceiver%2Fissues%2F16%23issuecomment-1302385141&data=05%7C01%7C%7C7b61099ba4d94cd91f0908dabdbab3e1%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638030906816770261%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=sxwhmdZ3Ft3sjrpFocu4O6UW4REqedD3%2Be1hdhxh1tE%3D&reserved=0>, or unsubscribe<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAI5KPMYZTDRIUCVIBUXB253WGPTXPANCNFSM6AAAAAARVHHH3Y&data=05%7C01%7C%7C7b61099ba4d94cd91f0908dabdbab3e1%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638030906816770261%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=UGO%2FP2fkwri4i9kW%2FNh39JTeFnFWjv%2FdCVrNaajm42k%3D&reserved=0>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Hi Phil, I just added a pin definition for TTGO_LORA32 in WeatherSensorCfg.h which uses the defines from the board specific header files. Can we close this issue then? Best regards |
I have had another go at this and I think that the issue is in WeatherSensor.cpp with these lines
I think there should be brackets round USE_CC1101 |
It would also explain why I couldn't get any output from turning Debug on because all the #ifdef statements for DEBUG_MODE are missing brackets too. |
I don't think so.
Next I added the following in
The warning is printed by the compiler (or actually the pre-processor) according to the selected define in I recommend to add some kind of warning in your file to see if the sketch is compiled with the copy of the library files you are expecting. |
Here the order of the define and the macros using it was wrong in a previous version. |
I installed the library as a zip to a fresh installation of Arduino IDE. It compiled but the serial monitor produced no output after the MQTT connection and didn’t start the radio chip. I inserted serial.print statements and it didn’t reach the radio.begin statement for the SX1276. I only got it to work by deleting the ifdef statement completely. I’m not sure why it is ignoring the else so not starting the SX1276.
Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows
From: Matthias ***@***.***>
Sent: 03 January 2023 13:04
To: ***@***.***>
Cc: ***@***.***>; State ***@***.***>
Subject: Re: [matthias-bs/BresserWeatherSensorReceiver] LILYGO® TTGO LORA32 868/915Mhz ESP32 LoRa OLED - pinouts (Issue #16)
I don't think so.
First I had a look at Bjarne Stroustrup: The C++ Programming Language. According to it (chapter R16 in my German version)
#if defined IDENTIFIER
and
#if defined (IDENTIFIER)
and
#ifdef IDENTIFIER
are equivalent.
Next I added the following in WeatherSensor.cpp:
#ifdef USE_CC1101
#warning "Building for CC1101"
int state = radio.begin(868.3, 8.21, 57.136417, 270, 10, 32);
#else
#warning "Building for SX1276"
int state = radio.beginFSK(868.3, 8.21, 57.136417, 250, 10, 32);
#endif
The warning is printed according to the selected define in WeatherSensorCfg.h.
I recommend to add some kind of warning in your file to see if the sketch is compiled with the copy of the library files you are expecting.
—
Reply to this email directly, view it on GitHub<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmatthias-bs%2FBresserWeatherSensorReceiver%2Fissues%2F16%23issuecomment-1369744484&data=05%7C01%7C%7C6143bfa59e0942196cb608daed8b17ce%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638083478910283805%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=j1o%2BrKKL6%2BDO%2BC%2BsMQVauTa%2Bg10Gd%2BSLTnq1zNeGXC0%3D&reserved=0>, or unsubscribe<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAI5KPM7K7HR4UMNTQJYQC5TWQQPW7ANCNFSM6AAAAAARVHHH3Y&data=05%7C01%7C%7C6143bfa59e0942196cb608daed8b17ce%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638083478910283805%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=CWDndvqgFApBIAp%2FtICyzeCMvPO0XdCMjnXaY8528Ag%3D&reserved=0>.
You are receiving this because you modified the open/close state.Message ID: ***@***.***>
|
You are building the sources in https://github.com/matthias-bs/BresserWeatherSensorReceiver/tree/main/examples/BresserWeatherSensorMQTTCustom with all changes made in https://github.com/matthias-bs/BresserWeatherSensorReceiver/tree/main/examples/BresserWeatherSensorMQTTCustom/src, right? |
I've now got a V1 to run. But I took it as Lorawan_Node: // Arduino default SPI pins
|
LORAWAN_NODE was just intended as a define for my own board. |
The pinout for this device is different as the SX1278 is hardwired.
GPIO5 -- SX1278's SCK
GPIO19 -- SX1278's MISO
GPIO27 -- SX1278's MOSI
GPIO18 -- SX1278's CS
GPIO14 -- SX1278's RESET
GPIO26 -- SX1278's IRQ(Interrupt Request)
There doesn't seem to be a place to edit the default pins. The board is available in the Boards Manager but I'm not sure if that filters through to your code.
The MQTT output goes online then 25 seconds later goes to dead. I can't get the test versions to compile so not sure whether it an issue from the weather station to the radio or radio to ESP32. Any ideas?
The text was updated successfully, but these errors were encountered: