Preferences library – max tag length

When using the Preferences library take into account that each entry has a max length of 1984 bytes. Defined in nvs.h line 127


Read more

Change partition size (PlatformIO)

To change the partition size for ESP32 using PlatformIO I recommend this approach: Create a new partition description file in <USER>\.platformio\packages\framework-arduinoespressif32\tools\partitions, e.g max.csv

The above example gives you a partition size of 0x1E0000 or 1966080 bytes on cost of a smaller SPIFFS partition. Then go to <USER>\.platformio\packages\framework-arduinoespressif32\variants and make a copy of the folder matching your board, for my board that is the folder ‘esp32‘ and my copy is named ‘esp32max‘ Then go to <USER>\.platformio\platforms\espressif32\boards\ and copy the .json

Read more

How to use stickbreaker’s I2C improved code

stickbreaker has worked a lot to improve the problems with I2C on the ESP32. But his work has not yet been merged into Arduino-ESP32 framework. To use stickbreakers improvements you can download his code from his Github repo’s release and replace the following files in your ESP32 folder: examples in libraries/Wire/examples readme in libraries/Wire/doc readme in root modified files cores/esp32/esp32-hal-i2c.h cores/esp32/esp32-hal-i2c.cpp cores/esp32/esp32-hal-log.h libraries/Wire/src/Wire.h libraries/Wire/src/Wire.cpp

Read more

Change partition size (Arduino IDE)

DEPRECATED. The partition size can now be choosen from the Tools–>Partition Scheme menu. To change the partition size for ESP32 using Arduino IDE I recommend this approach: Create a new partition description file in <LOCATION_OF_ARDUINO_ESP32>/tools/partitions , e.g max.csv

The above example gives you a partition size of 0x1E0000 or 1966080 bytes on cost of a smaller SPIFFS partition. Edit <LOCATION_OF_ARDUINO_ESP32>/boards.txt Make a copy of the board description that you want to change the partition size for, in this example

Read more

Preferences library – max key name length

According to the Preferences Example StartCounter.ino the namespace is limited to 15 chars! This is valid not only for the preferences name, but as well for the preferences keys. For example a key name bluetooth_status will fail while the key name bluetooth_stat works fine. Example and debug output: Key name with 16 characters length:

will fail to write the key value with the following error:

Changing the length of the key name to 14 characters works fine:

Read more

Expansion of NVS partition requires adapt default app partition address in esptool

If you want to increase the size of the NVS partition, the start address of the app partition changes as well. But Arduino IDE (using esptool to flash the ESP32) has the start address hard-coded. If, for example, you change your partition table into

The new start address for the application would be 0x20000 instead of 0x10000. Arduino IDE would flash the application, but to the wrong address. To flash the app to the correct address there are 2

Read more

WiFi AP and STA active at the same time

When the ESP32 is activating it’s accesspoint and then tries to connect as a client to another WiFi AP, the connection can fail. Reported by user josmunpav in issue 653. Possible solution is to set WiFi first into WIFI_MODE_APSTA mode first. Example initialization sequence:

Read more

TTGOV2 SD card support

The SD card library fails to work on the [TTGOV2]( board. User JamesGKent found a solution how to initialize the SD card:

What JamesGKent found is … from my reading here SD cards can be used in 3 modes, one of which is SPI and the other two are SD specific. on AVRs the SPI mode is normally used because there is hardware built in for it, so it is faster that software emulating either of the other two modes. on the

Read more

ESP32 framework installation on Windows XP

On Windows XP the installation of arduino-esp32 fails with an error thrown by get.exe. User JamesGKent found an explanation and partly solution. Explanation: The issue with esp32 on windows xp is get.exe, esptool.exe are basically a compiled version of the python scripts, they’ve been built with a new version of pyserial library that does not work on windows XP. Solution: Modify the platform.txt file so that it uses python like the Linux version does. Note that you’ll need to have

Read more
Free Link Directory