It’s so weird… As I said, I was using the ESP32 board plugged into a breadboard and it was working fine with PlatformIO’s serial monitor and as soon as I took it out and tried uploading/running it again, the crashes are back. Anyway, here’s what you asked:
I tried to change versions, it downloaded and installed, v1.0.6 onwards disappeared from version selection, but it still shows v2.0.0-alpha 1. And the program doesn’t crash. I can’t remove and add it again it either. It shows some java null pointer exception if I try to remove it.
o_o that’s not good. In extreme cases try to restart the Arduino IDE are reinstall it. The core is always re-installable and you can backup existing libraries in C:\Users\<user>\Documents\Arduino\libraries.
Though I don’t have any idea why the program is behaving eratically in the first place. Sounds like a hardware issue if it works inside a breadboard but not outside… But then again why would it work in the Arduino IDE and not PlatformIO.
Yeah. I’ll try reinstalling and update on this later. Meanwhile I should mention platform io’s flashing feels weird too. I don’t have to hold the programming button on MCU board, it right away starts flashing. With Arduino ide, it waits till I hold the programming button down for a while. And all of these problems are reproducible on all 3 boards I have. I just got them yesterday.
This became a problem to me today. ESP32’s bluetooth master mode/discovery mode doesn’t seem to work with old versions. I’m talking about this example. I feel bad for having to leave a real IDE in favor of arduino IDE
OOF BIG THANKS. After a little bit of tinkering(installing git, I already had git in visual studio but it didn’t work outside VS, and updating esptoolpy, letting intellisense rebuild indexes for quite some time) it finally compiles!
Thanks a bunch!!
Then open Arduino IDE serial monitor. Everything works perfect - board send “On Off On Off” with one-second delay.
Then I open PIO serial monitor. Board starts sending constantly the same value “On On On” or “Off Off Off” without delay. It looks like it freeze in a loop. In this state, I also can not restart Arduino by button. After turning monitor off, I have to unplug Arduino from power source, then it works.
I checked other serial monitors: putty, Linux command screen. Each of them works exactly like PIO monitor.
So, is there anything special in Arduino monitor? Why does it work, but none of others? Here is my config:
You can only get equal results with equal board settings. If you choose “Generic ESP8285 Module” in the Arduino IDE, choose esp8285.json in PlatformIO too and configure the remaining parts.
I checked it and still don’t work.
But there is the change. In this way, Arduino monitor also don’t work - makes board ‘freeze’. It looks like board is waiting for something. When I close monitor, the board works normally again without any reset.
The ESP8266’s bootloader output at 74880 baud is suppressed by the Arduino IDE, but not in PlatformIO. You will see that if you use that baud in both code and platformio.ini, the ‘weird’ characters are gone and bootloader messages.