Help compiling a working esp-mdf Dev Kit -> Button

User avatar
fasani
Posts: 196
Joined: Wed Jan 30, 2019 12:00 pm
Location: Barcelona
Contact:

Help compiling a working esp-mdf Dev Kit -> Button

Postby fasani » Tue Feb 19, 2019 11:19 pm

Hello there,
Trying to compile this in a ESP32-Wroom:

https://github.com/espressif/esp-mdf/tr ... kit/button

I tried the light already and it works great, attached an RGB light and been playing long controlling it from ESP-Mesh App.
Now this button seems to compile correctly but I could never configure it.

This is what I see on the Log:

Code: Select all

␛[0;32mI (507) cpu_start: Pro cpu up.␛[0m
␛[0;32mI (507) cpu_start: Application information:␛[0m
␛[0;32mI (507) cpu_start: Project name:     button␛[0m
␛[0;32mI (509) cpu_start: App version:      188bbaf␛[0m
␛[0;32mI (514) cpu_start: Compile time:     00:02:48␛[0m
␛[0;32mI (519) cpu_start: Compile date:     Feb 20 2019␛[0m
␛[0;32mI (524) cpu_start: ESP-IDF:          v3.3-beta1-223-ga62cbfec9␛[0m
␛[0;32mI (531) cpu_start: Single core mode␛[0m
␛[0;32mI (535) heap_init: Initializing. RAM available for dynamic allocation:␛[0m
␛[0;32mI (542) heap_init: At 3FFAFF10 len 000000F0 (0 KiB): DRAM␛[0m
␛[0;32mI (548) heap_init: At 3FFB6388 len 00001C78 (7 KiB): DRAM␛[0m
␛[0;32mI (554) heap_init: At 3FFB9A20 len 00004108 (16 KiB): DRAM␛[0m
␛[0;32mI (561) heap_init: At 3FFBDB5C len 00000004 (0 KiB): DRAM␛[0m
␛[0;32mI (567) heap_init: At 3FFC8B00 len 00017500 (93 KiB): DRAM␛[0m
␛[0;32mI (573) heap_init: At 3FFE0440 len 0001FBC0 (126 KiB): D/IRAM␛[0m
␛[0;32mI (579) heap_init: At 40078000 len 00008000 (32 KiB): IRAM␛[0m
␛[0;32mI (585) heap_init: At 40096128 len 00009ED8 (39 KiB): IRAM␛[0m
␛[0;32mI (592) cpu_start: Pro cpu start user code␛[0m
D (273) [mupgrade_check, 138]: Add an identifier to the firmware: ** MUPGRADE_FIRMWARE_FLAG **␛[0m
␛[0;32mI (275) esp_core_dump: Init core dump to flash␛[0m
␛[0;32mI (277) esp_core_dump: Found partition 'coredump' @ 3d0000 65536 bytes␛[0m
␛[0;32mI (287) cpu_start: Found core dump 13092 bytes in flash @ 0x3d0000␛[0m
␛[0;32mI (291) cpu_start: Starting scheduler on PRO CPU.␛[0m
I (449) wifi: wifi driver task: 3ffcd24c, prio:23, stack:3584, core=0
I (449) wifi: wifi firmware version: 44ce2e2
I (449) wifi: config NVS flash: enabled
I (452) wifi: config nano formating: disabled
␛[0;32mI (456) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE␛[0m
␛[0;32mI (465) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE␛[0m
I (483) wifi: Init dynamic tx buffer num: 32
I (483) wifi: Init data frame dynamic rx buffer num: 32
I (484) wifi: Init management frame dynamic rx buffer num: 32
I (489) wifi: Init static rx buffer size: 1600
I (493) wifi: Init static rx buffer num: 10
I (497) wifi: Init dynamic rx buffer num: 32
I (502) wifi: Set ps type: 0

␛[0;32mI (563) phy: phy_version: 4006, e540b8e, Dec 17 2018, 11:53:06, 0, 0␛[0m
I (564) wifi: mode : sta (30:ae:a4:d9:c8:30)
I (566) ESPNOW: espnow [version: 1.0] init
␛[0;32mI (580) [button_driver, 461]: Power hold␛[0m
␛[0;33mW (581) [button, 469]: <ESP_ERR_NVS_NOT_FOUND> Device network event is not configured␛[0m
␛[0;32mI (883) [button_driver, 468]: Power down␛[0m
So I don't see it ever opens BT to let me configure it. It just powers down, I'm missing something ?
Thanks in advance for your help!
epdiy collaborator | http://fasani.de Fan of Espressif MCUs and electronic design

ESP_LBB
Posts: 108
Joined: Fri May 18, 2018 3:41 am

Re: Help compiling a working esp-mdf Dev Kit -> Button

Postby ESP_LBB » Thu Feb 21, 2019 12:18 pm

Hi Fasani,

In order to configure the button, you need to connect with USB power supply.

User avatar
electronickiwi
Posts: 4
Joined: Fri Mar 23, 2018 2:42 am

Re: Help compiling a working esp-mdf Dev Kit -> Button

Postby electronickiwi » Thu Feb 28, 2019 2:46 am

If you are running the button code on your own hardware you can pull the BUTTON_GPIO_USB_DETECT pin (GPIO_38 by default) up to 3v3 to emulate USB power being connected to charge the battery. You can change the pin number in button_driver.c at line 44.

This will then make the button visible to the mesh app so you can configure it.

User avatar
fasani
Posts: 196
Joined: Wed Jan 30, 2019 12:00 pm
Location: Barcelona
Contact:

Re: Help compiling a working esp-mdf Dev Kit -> Button

Postby fasani » Fri Mar 01, 2019 5:51 pm

Thanks electronickiwi!
That's a great piece of information I read anywhere else but here. I will try it out!
epdiy collaborator | http://fasani.de Fan of Espressif MCUs and electronic design

Who is online

Users browsing this forum: No registered users and 39 guests