github.com/espressif/arduino-esp32
https://github.com/nkolban/esp32-snippets
github.com/nkolban/ESP32_Explorer
ESP32 Thing Hookup Guide
2 x Cores
Andreas Spiess – #168 ESP32 Dual Core on Arduino IDE including Data Passing and Task Synchronization
———————————————————————————————–
Arduino Core
.platformio\packages\framework-arduinoespressif32\cores\esp32\Arduino.h
.platformio\packages\framework-arduinoespressif32\cores\esp32\esp32-hal-spi.h
.platformio\packages\framework-arduinoespressif32\variants\lolin32\pins_arduino.h
#define FSPI 1 //SPI bus attached to the flash (can use the same data lines but different SS)
#define HSPI 2 //SPI bus normally mapped to pins 12 - 15, but can be matrixed to any pins
#define VSPI 3 //SPI bus normally attached to pins 5, 18, 19 and 23, but can be matrixed to any pins
———————————————————————————————–
Arduino Libraries
.platformio\packages\framework-arduinoespressif32\libraries\SPI\src\SPI.h
———————————————————————————————–
PlatformIO
Getting Started with ESP32 and PlatformIO
Build Panel
Platformio IDE atom – is there a way to display console as tab instead as notification
PlatformIO IDE for Atom: Keep build panel visible
platformio.ini
Project Configuration File platformio.ini
Section [platformio]
Section [env:NAME]
Include Arduino Libraries
Including Arduino libraries together with private libraries
github.com/openenergymonitor/emonth2/blob/master/firmware/platformio.ini
Platform Versions
packages/framework-arduinoavr/platform.txt version=1.6.19
packages/framework-arduinoespressif32/platform.txt version=0.0.1
manifest.json
"framework-arduinoespressif32": [
{
"sha1": "553fe9ef85dbcff8c0f9ecbc4ada3901a723e91c",
"system": "*",
"url": "http://dl.platformio.org/packages/framework-arduinoespressif32-1.1.5.tar.gz",
"version": "1.1.5"
},
{
"sha1": "27df506d863696ef51caf4cbb08e3470abf01f17",
"system": "*",
"url": "http://dl.platformio.org/packages/framework-arduinoespressif32-1.2.0.tar.gz",
"version": "1.2.0"
},
{
"sha1": "a36e2dc833f2a6152b341b2dd9f54d4335a8ba0e",
"system": "*",
"url": "http://dl.platformio.org/packages/framework-arduinoespressif32-1.3.2.tar.gz",
"version": "1.3.2"
}
],
"frameworks": {
"arduino": {
"package": "framework-arduinoespressif32",
"script": "builder/frameworks/arduino.py"
},
"espidf": {
"package": "framework-espidf",
"script": "builder/frameworks/espidf.py"
},
"simba": {
"package": "framework-simba",
"script": "builder/frameworks/simba.py"
},
"pumbaa": {
"package": "framework-pumbaa",
"script": "builder/frameworks/pumbaa.py"
}
},
"packages": {
"toolchain-xtensa32": {
"type": "toolchain",
"version": "~1.50200.0"
},
"framework-arduinoespressif32": {
"type": "framework",
"optional": true,
"version": "~1.2.0"
},
"framework-espidf": {
"type": "framework",
"optional": true,
"version": "~2.210.0"
},
},
"packages": {
"toolchain-atmelavr": {
"type": "toolchain",
"version": "~1.40902.0"
},
"framework-arduinoavr": {
"type": "framework",
"optional": true,
"version": "~1.10619.0"
},
},
———————————————————————————————–
Peripheral to Pin Re-Mapping
MCU pin setup, Visual pin layout setup tool for development boards
with an editor mode for community involvement
ESP 32 Pin re-mapping
ESP32 (9) – Basic I/O
Bluetooth
github.com/nkolban/ESP32_BLE_Arduino
$ cd /c/Users/bachman0/.platformio/packages/framework-arduinoespressif32
$ grep -r esp_bluedroid_init .
./libraries/SimpleBLE/src/SimpleBLE.cpp: if (esp_bluedroid_init()) {
./libraries/SimpleBLE/src/SimpleBLE.cpp: log_e("esp_bluedroid_init failed");
./tools/sdk/include/bluedroid/esp_bt_main.h: * @brief Enable bluetooth, must after esp_bluedroid_init()
./tools/sdk/include/bluedroid/esp_bt_main.h: esp_err_t esp_bluedroid_init(void);
./tools/sdk/lib/libbt.a: (BINARY)
———————————————————————————————–
IR Thermometer
Adafruit-MLX90614-Library: Arduino library for the MLX90614 sensors
SparkFun MLX90614 Arduino Library
MLX90614 IR Thermometer Driver Library for Arduino (only for Arduino UNO)
Library for the Melexis Digital IR Thermometer Type MLX90614 (variants)
Digital_Infrared_Temperature_Sensor_MLX90615
MLX90615 – A minimal Arduino library for Melexis MLX90615 Infra-red Temperature Sensor
Library for the MLX90615
———————————————————————————————–
Partition Table
Looking To The IoT Future With PlatformIO And ESP32
Name |
Type |
Subtype |
Offset |
Size |
Flags |
bootloader |
|
|
0x001000 |
|
|
partition table |
|
|
0x008000 |
|
|
nvs |
data |
nvs |
0x009000 |
20K |
|
otadata |
data |
ota |
0x00e000 |
8K |
|
app0 |
app |
ota_0 |
0x010000 |
1280K |
|
app1 |
app |
ota_1 |
0x150000 |
1280K |
|
eeprom |
data |
153 |
0x290000 |
4K |
|
spiffs |
data |
spiffs |
0x291000 |
1468K |
|
|
$ pio run -v --target upload
$ /c/Users/bachman0/.platformio/packages/framework-espidf/components/partition_table/gen_esp32part.py --verify partitions.bin partitions.csv
$ gen_esp32part.py --verify partitions.bin partitions.csv
Parsing binary partition input...
$ "c:\users\bachman0\.platformio\penv\scripts\python.exe" \
"C:\Users\bachman0\.platformio\packages\framework-arduinoespressif32\tools\esptool.py" \
--before default_reset
--after hard_reset
--chip esp32
--port "COM21"
--before default_reset
--after hard_reset
--baud 115200
write_flash
-z
--flash_mode dio
--flash_freq 80m
--flash_size detect
0x1000 "C:\Users\bachman0\.platformio\packages\framework-arduinoespressif32\tools\sdk\bin\bootloader.bin"
0x8000 "C:\Users\bachman0\Documents\PlatformIO\Projects\lolin32-arduino-PA17_bmat_6\.pioenvs\lolin32\partitions.bin"
0xe000 "C:\Users\bachman0\.platformio\packages\framework-arduinoespressif32\tools\partitions\boot_app0.bin"
0x10000 .pioenvs\lolin32\firmware.bin
———————————————————————————————–
SPIFFS
github.com/espressif/arduino-esp32/libraries/SPIFFS
github.com/joysfera/esp-idf-spiffs
github.com/copercini/arduino-esp32-SPIFFS, DEPRECATED
github.com/me-no-dev/arduino-esp32fs-plugin, Arduino plugin for uploading files to ESP32 file system
github.com/igrr/mkspiffs, Tool to build and unpack SPIFFS images
How to `git clone` including submodules?
Store and read some static files using SPIFFS
$ git clone --recursive git://github.com/foo/bar.git
$ cd bar
$ git clone git://github.com/foo/bar.git
$ cd bar
$ git submodule update --init --recursive
-d <0-5>, --debug <0-5> Debug level. 0 means no debug output.
-b <number>, --block <number> fs block size, in bytes
-p <number>, --page <number> fs page size, in bytes
-s <number>, --size <number> fs image size, in bytes
#define CONFIG_SPIFFS_LOG_BLOCK_SIZE 8192
#define CONFIG_SPIFFS_LOG_PAGE_SIZE 256
#define CONFIG_SPIFFS_BASE_ADDR 0x291000
#define CONFIG_SPIFFS_SIZE 1478656
$ ./mkspiffs \
-c jquery \
-b 8192 \
-p 256 \
-s 1478656 \
spiffs.img
$ esptool.py \
--chip esp32 \
--port "COM21" \
--baud 115200 \
write_flash \
-z \
--flash_mode "dio" \
--flash_freq "80m" \
--flash_size detect \
0x291000 spiffs.img
———————————————————————————————–
Interactive Shell / Interpreter
github.com/lumostor/arduino-esp32-LinenoiseBitlash
———————————————————————————————–
Timer
ESP32TimerInterrupt
github.com/khoih-prog/ESP32TimerInterrupt
———————————————————————————————–
Digital Potentiometer
MCP45HVX1, Library for MCP45HVX1 digital potentiomters
github.com/WifWaf/MCP45HVX1, Arduino Library for MCP45HVX1 digital potentiometers. Includes TCON register and incremental control.