I'm quite new in this microcontroller topic and my next step is to make use of a wlan module, which is a ESP WROOM 32. As IDE I'm using Visual Studio + PlatformIO and I can't figure out how to access the module. Atm I use these parameters:
[env:esp12e]
platform = espressif8266
board = esp12e
framework = arduino
monitor_speed = 74880
but I receive:
(...)
CURRENT: upload_protocol = esptool
Looking for upload port...
Auto-detected: /dev/ttyUSB0
Uploading .pio/build/esp12e/firmware.bin
esptool.py v2.8
Serial port /dev/ttyUSB0
Connecting......
Chip is ESP8266EX
Features: WiFi
WARNING: Detected crystal freq 20.45MHz is quite different to normalized freq 26MHz. Unsupported crystal in use?
Crystal is 26MHz
MAC: 00:08:ff:00:00:00
Uploading stub...
Running stub...
A fatal error occurred: Invalid head of packet (0x46)
*** [upload] Error 2
============================================================================= [FAILED] Took 3.27 seconds =============================================================================
The terminal process "platformio 'run', '--target', 'upload'" terminated with exit code: 1.
edit: The ESP WROOM 32 is a NodeMCU 32 and the board config now is:
[env:espwroom32]
platform = espressif32
board = nodemcu-32s
framework = arduino
monitor_speed = 115200
and to check if everything works:
void setup() {
pinMode(2, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(2, HIGH);
delay(1000);
digitalWrite(2, LOW);
delay(1000);
}
I also had problems that I received Failed to connect to ESP32: Timed out waiting for packet header
nevertheless but here is a nicely explained workaround for that. Solution is, either you hold the BOOT
button pressed while uploading the code or you sold a capacitor to specific pins on the board.
I just tried to hold the boot button and it's blinking now. Finally :)
I'm sure, a lot of further issues are only waiting on the way ^