Closed PureTek-Innovations closed 3 months ago
It was pointed out to me that GPIO19 is also USB_D- https://resource.heltec.cn/download/Wireless_Stick_Lite_V3/HTIT-WSL_V3.png https://resource.heltec.cn/download/Wireless_Stick_Lite_V3/HTIT-WSL_V3_Schematic_Diagram.pdf I have now swapped GPIO19 to GPIO18 The behavior is the same.
I'm having the same issue. Are there any solutions yet? I've tried I2C and SPI
I'll be taking a look at this problem today, thanks for you patience.
Sorry for the late response on this @PureTek-Innovations. The solution was a lot more simple:
void SparkFun_AS3935::setIndoorOutdoor(uint8_t _setting)
{
if (((_setting != INDOOR) && (_setting != OUTDOOR)))
return
_writeRegister(AFE_GAIN, GAIN_MASK, _setting, 1);
}
The return
statement above was lacking a semicolon which forced the _writeRegister
function call to act as part of the return statement. Meaning that it would only ever write the setting if the value passed to the function was incorrect. So whenever you passed the correct setting it wouldn't write anything to the register.
Sorry for the troubles, this is fixed in this commit and will be in the Arduino Library under 1.4.9 shortly.
I'm using a Heltec Stick Lite ESP32-S3 LoRa module and I can set and check all of the settings apart from the INDOOR/OUTDOOR setting. I need to use the HSPI class as the LoRa module uses the SPI class. I've tried different baud rates with no success. The other settings can be changed and read back successfully. I've used the same sensor with a plain ESP32 on the default SPI port and everything worked properly including INDOOR/OUTDOOR.
Any ideas or help appreciated, thank you.
Your workbench
Steps to reproduce
This is the More Lightning Settings SPI example with HSPI added.
Expected behavior
The INDOOR/OUTDOOR setting should change to OUTDOOR
Actual behavior
The INDOOR/OUTDOOR setting remains on INDOOR