Shelly devices

There’s a whole range of really cool Shelly modules for use in the home, here’s a Knowledgebase https://kb.shelly.cloud/knowledge-base/ UK store https://shellystore.co.uk/

Read More

Light sleep

In light sleep mode, digital peripherals, most of the RAM, and CPUs are clock-gated, and supply voltage is reduced. Upon exit from light sleep, peripherals and CPUs resume operation, their internal state is preserved. Documentation https://docs.espressif.com/projects/esp-idf/en/v4.4.5/esp32c3/api-reference/system/sleep_modes.html Example light sleep function Used with ESP32 C3

Read More

Crashing issues

Documentation https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/fatal-errors.html Settings you can utilise Panic handler behaviour (CONFIG_ESP_SYSTEM_PANIC configuration) What happens when a fatal issue occurs and what is output can be changed, including having the CPU halt if you wish: menuconfig > Component config > ESP System Settings > Panic handler behaviour

Read More

.6 Releasing a project

ESP32 release config Check the ESP32 settings as detailed on this page menuconfig particular settings to check: Panic handler behaviour (CONFIG_ESP_SYSTEM_PANIC configuration) What happens when a fatal issue occurs and the CPU has to halt.Component config > ESP System Settings > Panic handler behaviour = Print registers and reboot Releasing files and setup for production […]

Read More

File access issues

fgets() does not handle 0x0d only Macintosh formatted text files In our use of fgets() (2023-11) using fgets with the esp-idf failed with mac formatted text files. The missing 0x0a LF character meant it did not detect the end of each line.

Read More

.Debugging

Fatal errors of the ESP32 https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/fatal-errors.html Stopping the ESP32 resetting immediately when it has a segmentation fault etc In menuconfig (setting gear icon in bottom blue bar) set “Panic handler behaviour” to “Print registers and halt” Breakpointing on panic If CONFIG_ESP_DEBUG_OCDAWARE is enabled (default=enabled), the panic handler will detect whether a JTAG debugger is connected […]

Read More

Serial output viewing

To view the serial output of an ESP32 without using an IDE the following guide can be used. Install PuTTY PuTTY is a standard tool that provides a simple terminal interface. https://www.chiark.greenend.org.uk/~sgtatham/putty/ Connect Hardware In our setup we used an ESP-Prog as the USB / Serial adaptor, connected to our ESP32 via the 6 pin […]

Read More

AtoD voltage range

N.B. you do not necessarily get a range all the way to 3.3V VCC!!!! On the ESP32S2 using adc_cali_raw_to_voltage() the max voltage we could read was 2.643V with atten = ADC_ATTEN_DB_11 The ESP32 has an AtoD Vref of approx 1.1V, but this is nominal and it can be in the range 1.0 to 1.2V. An […]

Read More