Open adrian0 opened 8 months ago
The Arduino library was written with conditional code for the ESP8266 allowing specifying the I2C pins in the begin() method so it won't compile with that code for the ESP32. Try changing the
#ifdef ESP8266
to
#ifdef ESP32
in the mpptChg.cpp and mpptChg.h files in your Arduino library installation.
I'm currently on holiday so can't test this for a while but update this if it works (or what it takes to get it to work) and we can update the Arduino library to support both ESP8266 and ESP32.
Changing the ifdef statement to ESP32 seems to highlight that the variable types used for the ESP8266 library don't work for the ESP32. Ran out of time before having to travel for work. When back home, I need to work a bit more on the variable types for ESP32.
Hi Dan, I wonder if it's possible to get the sample code running on ESP32s
Swapping out the ESP8266WiFi.h for the regular WiFi.h library is the one obvious change. But I can't work out how to get past the compilation errors with mpptChg.h