OpenSprinkler › Forums › OpenSprinkler Unified Firmware › ESP32 port of 2.1.9 firmware › Reply To: ESP32 port of 2.1.9 firmware
June 23, 2020 at 5:28 am
#66954
cherokeecruiser2
Participant
Hi,
Thanks for all the effort of porting to the ESp32.
I have an ESp32 WROOM with external OLED on pins SDA 21 and SCL 22. Everything compiled without errors, but after it uploaded, it would only continually reboot and never start.
I have modified a small piece of code in mainArduino
The Original Code:
#if defined(ESP32)
int i;
unsigned int pin_list[] = ON_BOARD_GPIN_LIST;
for( i=0; i<7; i++ ){
if(pin_list[i] !=255){
pinMode(i, OUTPUT);
digitalWrite(i, ~STATION_LOGIC);
}
}
Changed to this:
#if defined(ESP32)
int i;
unsigned int pin_list[] = ON_BOARD_GPIN_LIST;
for( i=0; i<8; i++ ){
if(pin_list[i] !=255){
pinMode(pin_list[i], OUTPUT);
digitalWrite(pin_list[i], ~STATION_LOGIC);
}
}
#endif
I believe the original code was potentially setting pins 6 and 7 which on this version of ESP32 are connected to the integrated SPI flash, and causing the crash reboot cycle.
It now works perfectly for me – hope it helps for someone else