Skip to content

Commit

Permalink
Adding creation of the bus instance without which the code crashes
Browse files Browse the repository at this point in the history
  • Loading branch information
dmercer-google committed Jan 15, 2025
1 parent 446a88f commit bd67678
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions components/ds18b20/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ DS18B20 temperature sensor only uses a single wire to write and read data, the i
esp_err_t search_result = ESP_OK;

// create 1-wire device iterator, which is used for device search
ESP_ERROR_CHECK(onewire_new_bus_rmt(&bus_config, &rmt_config, &bus));
ESP_ERROR_CHECK(onewire_new_device_iter(bus, &iter));
ESP_LOGI(TAG, "Device iterator created, start searching...");
do {
Expand Down

0 comments on commit bd67678

Please sign in to comment.