ESP8266 + STM32F4 - Advice is needed before I waste more time!

Start new threads on different questions you have which are not covered here.

OK, thank you. I will start new threads for new questions. However, since this is still related to the project you shared with me, I will post it here.

Well, could you please explain this line: pio init --ide=vscode
Could you please reference it in the online documentation of PIO? Do I have to repeat the same steps for each and every project I want to import into PIO IDE?

https://docs.platformio.org/en/latest/userguide/cmd_init.html

(Re)creates the project files for the given IDE. If you create your project within VSCode, it does it automatically. If you want to import any PIO project in VSCode, you need to first create the VSCode project files using that command.

So true! Arduino really is just a framework that makes doing a lot of things easy, and in a pretty hardware agnostic manner. And once you’ve advanced ‘beyond’ Arduino… you can simply start to incorporate the Atmel C libraries and other stuff that underpins it - i.e. when you need faster IO twiddling, or multiple IOs manipulated simultaneously. It’s just a matter of how you use it!

Thank you for the input.

1 Like

As a newbie here, Can I ask the OP why choose the ESP8266 over the ESP32? I don’t know either of them that well and was just curious about the rationale.

I’m not the OP, but I use ESP8266 over ESP32 out of familiarity and cost… I started off with ESP8266s, and whilst I do have a couple of ESP32s, I’ve been waiting for the Arduino core to stabilise and get to the point where I can basically use the same code on both without concerns about something simple breaking.

On the cost front, ESP8266s start at around $2.30 for ESP-01s, and $3.80 for a ESP12 Wemos Mini, whereas the ESP32 boards start off at $7.80. Having said that, it can be quite cheaper or simpler for some projects, now that I’ve found out about the ultra-low power processor on the ESP32, making it so you don’t need a separate MCU for some tasks when power consumption is an issue. There isn’t that much of a price difference, and you are getting a better processor, but when you are just doing some sort of sensor, or simple clock project, there’s no much need for an ESP32… yet! :wink:

I’m sorry, I couldn’t get back earlier. Well, as pfeerick said, I picked up the ESP8266 for the very same reasons. Besides, the ESP8266 is not the main CPU in my project and I just need it as a WiFi co-processor in the project, which is built around another uC architecture. The ESP32 is an advanced one with whole lot of GPIOs, peripherals, and CPU speed. You might consider one if you want to use it as the main processor in your project, but in my case, the ESP8266 does the job perfectly!

By the way, as a beginner in the whole ESP family, I would always recommend the ESP8266. That’s what I did myself!

1 Like

Depending on your project, the ESP8266 can be the main CPU also… for simple things like WiFi sensors and NTP clocks they work pretty reliably… and even for some complex projects… if you take care on stability of the code, and make sure IOs are in proper state in case of sudden reboots… :wink:

- YouTubeOTA smt32 using esp8266

1 Like

With a ESP8266, It can upload sketch to STM32 series MCU on Arduino IDE without any wires:

https://github.com/csnol/STM32-OTA