If you really-really want to use this 2.0.0-alpha version, you can follow ESP32-Arduino - platformio support for 2.0.0 version - #2 by maxgerhardt to use it.
When I take the above code as src\main.cpp
, add a #include <Arduino.h>
in front of it and use with a platformio.ini
of
[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
platform_packages =
toolchain-xtensa32 @ ~2.80400.0
framework-arduinoespressif32@https://github.com/espressif/arduino-esp32.git#2.0.0-alpha1
monitor_speed = 115200
I get a successfull build
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [= ] 7.2% (used 23436 bytes from 327680 bytes)
Flash: [======= ] 69.7% (used 913716 bytes from 1310720 bytes)
Building .pio\build\esp32dev\firmware.bin
esptool.py v3.0
============ [SUCCESS] Took 16.79 seconds ============
and if I upload & monitor
rst:0x10 (RTCWDT_RTC_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:1252
load:0x40078000,len:12692
load:0x40080400,len:3100
entry 0x400805ec
The device started, now you can pair it with bluetooth!
Starting discoverAsync...Findings will be reported in "btAdvertisedDeviceFound"
Found a device asynchronously: Name: Redmi max, Address: b4:c4:fc:42:xx:xx, cod: 58987, rssi: -61
Stopping discoverAsync... stopped
Starting discover...
>> Dump scan results: 1
- 1: Name: Redmi max, Address: b4:c4:fc:42:xx:xx, cod: 58987, rssi: -55
-- Dump finished --