Skip to content

Commit

Permalink
Added rmt_config_t config Initialization with {}
Browse files Browse the repository at this point in the history
Otherwise sometimes the "NACK" error appears
  • Loading branch information
custodey authored Jun 21, 2024
1 parent c3f1a90 commit 8f3ef0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/esp32DHT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ DHT::~DHT() {
void DHT::setup(uint8_t pin, rmt_channel_t channel) {
_pin = pin;
_channel = channel;
rmt_config_t config;
rmt_config_t config{};
config.rmt_mode = RMT_MODE_RX;
config.channel = _channel;
config.gpio_num = static_cast<gpio_num_t>(_pin);
Expand Down

0 comments on commit 8f3ef0f

Please sign in to comment.