ESP32 Web Server (ESP-IDF v5.0.1) displaying temperature data from two DS18B20 sensors

@timofey.pro
Posts: 1
Joined: Sat Mar 25, 2023 4:18 pm

ESP32 Web Server (ESP-IDF v5.0.1) displaying temperature data from two DS18B20 sensors

Postby @timofey.pro » Sat Mar 25, 2023 4:36 pm

I have tested ESP32-DevKitC V4: ESP32-WROOM-32E, which was connected to two DS18B20 sensors and temperature data is passed to mobile via WiFi.
Please check my ESP-IDF v5.0.1 code which was published on GitHub: https://github.com/TimofeyPro/ESP32-ESP ... er-DS18B20
As a result of this solution you may see on mobile screen the following:
1. temperature data from two DS18B20 sensors
2. Sensor addresses on 1-Wire bus
3. MAC address of ESP32
4. ESP32 system time which was synchronized with SNTP server (pool.ntp.org).

Please let me know if you have any suggestions and questions.

in10city
Posts: 1
Joined: Sat Jul 08, 2023 1:00 pm

Re: ESP32 Web Server (ESP-IDF v5.0.1) displaying temperature data from two DS18B20 sensors

Postby in10city » Sat Jul 08, 2023 1:08 pm

A huge Thank You;
1. The Temp sensors are // Temp Sensors are on GPIO26 ; #define TEMP_BUS 17

2. When running without a connection to the wifi I had an error, which seems to be a IDF issue ?

I have attached the trace below.

Code: Select all

Waiting for the device to reconnect.
None
Waiting for the device to reconnect
I (17725) example_connect: WiFi Connect failed 7 times, stop reconnect.
ESP_ERROR_CHECK failed: esp_err_t 0xffffffff (ESP_FAIL) at 0x400d7e4a
0x400d7e4a: app_main at D:/work/vscode/sample1/main/main.c:404 (discriminator 1)

file: "./main/main.c" line 404
func: app_main
expression: example_connect()

abort() was called at PC 0x40088c9f on core 0
0x40088c9f: _esp_error_check_failed at C:/Users/movin/esp51/esp-idf/components/esp_system/esp_err.c:50



Backtrace: 0x400819c2:0x3ffba5b0 0x40088ca9:0x3ffba5d0 0x4008fbce:0x3ffba5f0 0x40088c9f:0x3ffba660 0x400d7e4a:0x3ffba690 0x4015f0cf:0x3ffba740 0x4008b689:0x3ffba770
0x400819c2: panic_abort at C:/Users/movin/esp51/esp-idf/components/esp_system/panic.c:452

0x40088ca9: esp_system_abort at C:/Users/movin/esp51/esp-idf/components/esp_system/port/esp_system_chip.c:84

0x4008fbce: abort at C:/Users/movin/esp51/esp-idf/components/newlib/abort.c:38

0x40088c9f: _esp_error_check_failed at C:/Users/movin/esp51/esp-idf/components/esp_system/esp_err.c:50

0x400d7e4a: app_main at D:/work/vscode/sample1/main/main.c:404 (discriminator 1)

0x4015f0cf: main_task at C:/Users/movin/esp51/esp-idf/components/freertos/app_startup.c:208 (discriminator 13)

0x4008b689: vPortTaskWrapper at C:/Users/movin/esp51/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:162





ELF file SHA256: eb5ee7509074330d

Rebooting...
ets Jun  8 2016 00:22:57

rst:0xc (SW_CPU_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:2
load:0x3fff0030,len:7076
load:0x40078000,len:15576
load:0x40080400,len:4
0x40080400: _init at ??:?

load:0x40080404,len:3876
entry 0x4008064c
I (29) boot: ESP-IDF v5.1 2nd stage bootloader
I (29) boot: compile time Jul  8 2023 21:57:39
I (29) boot: Multicore bootloader
I (33) boot: chip revision: v1.0
I (37) boot.esp32: SPI Speed      : 40MHz
I (42) boot.esp32: SPI Mode       : DIO
I (46) boot.esp32: SPI Flash Size : 2MB
I (51) boot: Enabling RNG early entropy source...
I (56) boot: Partition Table:
I (60) boot: ## Label            Usage          Type ST Offset   Length
I (67) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (74) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (82) boot:  2 factory          factory app      00 00 00010000 00100000
I (89) boot: End of partition table
I (94) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=24390h (148368) map
I (156) esp_image: segment 1: paddr=000343b8 vaddr=3ffb0000 size=03e10h ( 15888) load
I (162) esp_image: segment 2: paddr=000381d0 vaddr=40080000 size=07e48h ( 32328) load
I (176) esp_image: segment 3: paddr=00040020 vaddr=400d0020 size=90f18h (593688) map
I (390) esp_image: segment 4: paddr=000d0f40 vaddr=40087e48 size=0d728h ( 55080) load
I (413) esp_image: segment 5: paddr=000de670 vaddr=50000000 size=00004h (     4) load
I (425) boot: Loaded app from partition at offset 0x10000
I (425) boot: Disabling RNG early entropy source...
I (436) cpu_start: Multicore app
I (437) cpu_start: Pro cpu up.
I (437) cpu_start: Starting app cpu, entry point is 0x4008136c
0x4008136c: call_start_cpu1 at C:/Users/movin/esp51/esp-idf/components/esp_system/port/cpu_start.c:154

I (425) cpu_start: App cpu up.
I (455) cpu_start: Pro cpu start user code
I (455) cpu_start: cpu freq: 160000000 Hz
I (455) cpu_start: Application information:
I (459) cpu_start: Project name:     tim33_prod
I (465) cpu_start: App version:      1
I (469) cpu_start: Compile time:     Jul  8 2023 21:56:56
I (475) cpu_start: ELF file SHA256:  eb5ee7509074330d...
I (481) cpu_start: ESP-IDF:          v5.1
I (486) cpu_start: Min chip rev:     v0.0
I (491) cpu_start: Max chip rev:     v3.99 
I (495) cpu_start: Chip rev:         v1.0
I (500) heap_init: Initializing. RAM available for dynamic allocation:
I (507) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (513) heap_init: At 3FFB8448 len 00027BB8 (158 KiB): DRAM
I (520) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (526) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (532) heap_init: At 40095570 len 0000AA90 (42 KiB): IRAM
I (540) spi_flash: detected chip: generic
I (543) spi_flash: flash io: dio
W (547) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the size in the binary image header.
I (561) app_start: Starting scheduler on CPU0
I (565) app_start: Starting scheduler on CPU1
I (565) main_task: Started on CPU0
I (575) main_task: Calling app_main()
I (575) tim-info==>: Boot count: 1
--------------------------------------------------------------------------
This is esp32 chip with 2 CPU core(s), WiFi/BT/BLE, silicon revision v1.0, 2MB external flash  
Minimum free heap size: 277768 bytes
--------------------------------------------------------------------------
I (635) example_connect: Start example_connect.
I (645) wifi:wifi driver task: 3ffc0114, prio:23, stack:6656, core=0
I (665) wifi:wifi firmware version: b2f1f86
I (665) wifi:wifi certification version: v7.0
I (665) wifi:config NVS flash: enabled
I (665) wifi:config nano formating: disabled
I (665) wifi:Init data frame dynamic rx buffer num: 32
I (675) wifi:Init management frame dynamic rx buffer num: 32
I (675) wifi:Init management short buffer num: 32
I (685) wifi:Init dynamic tx buffer num: 32
I (685) wifi:Init static rx buffer size: 1600
I (685) wifi:Init static rx buffer num: 10
I (695) wifi:Init dynamic rx buffer num: 32
I (695) wifi_init: rx ba win: 6
I (705) wifi_init: tcpip mbox: 32
I (705) wifi_init: udp mbox: 6
I (705) wifi_init: tcp mbox: 6
I (715) wifi_init: tcp tx win: 5744
I (715) wifi_init: tcp rx win: 5744
I (715) wifi_init: tcp mss: 1440
I (725) wifi_init: WiFi IRAM OP enabled
I (725) wifi_init: WiFi RX IRAM OP enabled
I (735) phy_init: phy_version 4670,719f9f6,Feb 18 2021,17:07:07
None
Waiting for the device to reconnect...
None
Waiting for the device to reconnect.........................................................................

Who is online

Users browsing this forum: No registered users and 12 guests