pkerspe / ESP-StepperMotor-Server

Turn your ESP32 into a complete stepper motor control server with web UI, REST API and serial control interface
MIT License
225 stars 39 forks source link

Support for ESP8266 #14

Closed didkivskyy closed 3 years ago

didkivskyy commented 3 years ago

Hi, Impressive project. Is it possible to support boards with ESP8266 like NodeMCU or similar? They are supported by platformio very well. Or is there anything specific to ESP32 only?

Thanks!

pkerspe commented 3 years ago

Thanks for your comment. The ESP32 and the ESP8266 differ quite a lot. Not only do they have different underplaying architecture but also different OS. I am afraid the current version of the stepper server will not be running without major modifications on the ESP8266. Libraries would need to be exchanged and the general concept would need to be limited to less functionality.

Main issues might be, that the ESP32 has two cores (except for some models that only come with a single core) which allow for "multitasking" using the underlying FreeRTOS. Also the ESP32 has more RAM and of course a higher clock speed.

The stepper server uses a fair amount of the ESP32s RAM if all modules (webserver, CLI, RestAPI) are enabled, so that would be a limitation. Also the function to start the server as a service in its own task is not possible on the ESP8266 due to its single core and different "OS".

I can imagine that it is possible to come up with a clone that runs on the ESP8266 by performing the following steps:

didkivskyy commented 3 years ago

Yes. Sounds like a lot to do. So maybe not worth it.