Hi,
I am have a problem with PlatformIO and some new ESP32 devkit modules and I am at my wits end. I can program the ESP32 module just fine from the Ardunio IDE. If I take a pretty simple example like the ADC to Serial program and then program it in to the ESP32, bingo no problem it works.
If I take the exact same program and try and program it via the PlatformIO platform I get the dreaded:
ets Jun 8 2016 00:22:57
rst:0x3 (SW_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:0x3fff0018,len:4
load:0x3fff001c,len:1100
load:0x40078000,len:9232
load:0x40080400,len:6412
entry 0x400806a8
ets Jun 8 2016 00:22:57
rst:0x3 (SW_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:0x3fff0018,len:4
load:0x3fff001c,len:1100
load:0x40078000,len:9232
load:0x40080400,len:6412
entry 0x400806a8
ets Jun 8 2016 00:22:57
This goes on forever.
I have tried:
- erasing the flash
- improving the power supply
- changing the flash mode, frequency etc.
Nothing seems to make any difference at all.
The problem seems to be associated with these new modules, as old modules worked fine in the past (although I do not have any old modules to hand at the moment to check with).
My platformio.ini file looks like this:
[env:esp32doit-devkit-v1]
platform = espressif32
board = esp32doit-devkit-v1
framework = arduino
monitor_speed = 115200
My program is this:
#include <Arduino.h>
/*
AnalogReadSerial
Reads an analog input on pin 0, prints the result to the Serial Monitor.
Graphical representation is available using Serial Plotter (Tools > Serial Plotter menu).
Attach the center pin of a potentiometer to pin A0, and the outside pins to +5V and ground.
This example code is in the public domain.
http://www.arduino.cc/en/Tutorial/AnalogReadSerial
*/
// the setup routine runs once when you press reset:
void setup()
{
// initialize serial communication at 9600 bits per second:
Serial.begin(115200);
}
// the loop routine runs over and over again forever:
void loop()
{
// read the input on analog pin 0:
int sensorValue = analogRead(A0);
// print out the value you read:
Serial.println(sensorValue);
delay(1); // delay in between reads for stability
}
I am completely at a loss what to do next? The module clearly works just fine from Arduino IDE, it is just a problem with being programmed from the PlatformIO ide.
Thanks,
Matt.