darren41448:
Well, arduino is programmed not in C++ but in C.
That is, as you where told, plainly wrong. It is C++, and essentially all libraries that I came across are more or less object oriented (though often just a single object).
I am currently writing a [completely object oriented controller[/ur] for my floor heating for the ESP32, with support for MQTT, filters for the temperatur values, differenent thermostat and valve backends, OTA with telnet debug ...
For this, I get
DATA: [= ] 14.4% (used 47148 bytes from 327680 bytes)
PROGRAM: [====== ] 62.9% (used 824422 bytes from 1310720 bytes)
The bottleneck for speed is currently the update of the display, because I failed to wire the right pins for HW SPI. Be VERY careful with the pins you choose. There are SPI pins that you essentiall cannot use because they are used for the internal flash, there are SPI pins advertised that are actually for slave mode, there are input-only pins and there are IOs that need to be pulled HIGH or LOW during startup. Errors can very easily happen.
I just ordered one of these to be able to first breadboard the exact SMD module I am going to place on the PCB.
darren41448:
Programming in python is much easier than C, especially in my case (Classes would shorten my program).
My experience with larger codes is better with python.
That is why I asked what you know and what you are willing to invest.
darren41448:
Only thing I need to decide is if using "slightly" faster ESP32 will run better with C or micropython.
It will obviously run better with C++, because MicroPython is a horrible bloat, despite the name. As you can see with the Teensy 96MHz example. The 180MHz dual core ESP32 will give you more headroom, and that may be sufficient, but not more.
So again:
- You are not able or not willing to code or learn C++ -> Try micropython.
- You are -> The proper way is C++.
Also, if you decide to use C++ drop the ArduinoIDE. It is completely useless for a larger project or anything more than playing around with LEDs. I am quite happy with Visual Code+PlatformIO, but you can also use it with Atom or the commandline and your favorite editor.](GitHub - kvoit/FloorHeatingController_SW)