diff --git a/Arduino/CanGrow/CanGrow.ino b/Arduino/CanGrow/CanGrow.ino index 11f015e..33430da 100644 --- a/Arduino/CanGrow/CanGrow.ino +++ b/Arduino/CanGrow/CanGrow.ino @@ -134,7 +134,7 @@ void setup() { Wifi_Init(); Webserver_Init(); Serial.printf(":: [SETUP] Usable Pins: %d\n", GPIOindex_length); - for(byte i = 0; i < GPIOindex_length; i++) { + for(byte i = 1; i <= GPIOindex_length; i++) { Serial.printf(":: [SETUP] Pin Index: %d, GPIO: %d, Notes: ", i, GPIOindex[i].gpio); Serial.println(GPIO_Index_note_descr[GPIOindex[i].note]); } diff --git a/Arduino/CanGrow/include/CanGrow_ESP32.h b/Arduino/CanGrow/include/CanGrow_ESP32.h index c1bd1c2..2acadf4 100644 --- a/Arduino/CanGrow/include/CanGrow_ESP32.h +++ b/Arduino/CanGrow/include/CanGrow_ESP32.h @@ -63,7 +63,8 @@ // const byte GPIOindex_length = 21; // initialize pinIndex with all usable GPIOs -GPIO_Index GPIOindex[] = { { 0, FLASHMODE_LOW }, +GPIO_Index GPIOindex[] = {{ 255, 255 }, + { 0, FLASHMODE_LOW }, { 4 }, { 5 }, { 12, BOOTFAILS_HIGH }, diff --git a/Arduino/CanGrow/include/CanGrow_ESP8266.h b/Arduino/CanGrow/include/CanGrow_ESP8266.h index 98eefa2..446d0d9 100644 --- a/Arduino/CanGrow/include/CanGrow_ESP8266.h +++ b/Arduino/CanGrow/include/CanGrow_ESP8266.h @@ -47,7 +47,8 @@ const byte GPIOindex_length = 6; // initialize pinIndex with all usable GPIOs -GPIO_Index GPIOindex[] = { { 0, BOOTFAILS_LOW }, +GPIO_Index GPIOindex[] = {{ 255, 255 }, + { 0, BOOTFAILS_LOW }, { 12 }, { 13 }, { 14 }, diff --git a/Arduino/CanGrow/include/Webserver/Common.h b/Arduino/CanGrow/include/Webserver/Common.h index 7cc00cd..0ba05fa 100644 --- a/Arduino/CanGrow/include/Webserver/Common.h +++ b/Arduino/CanGrow/include/Webserver/Common.h @@ -118,7 +118,7 @@ String Html_SelectOpt_GPIOindex(byte selectId = 255) { String gpioIndex_html; // iterate through through all available GPIOs in index - for(byte i = 0; i < GPIOindex_length; i++) { + for(byte i = 1; i <= GPIOindex_length; i++) { bool gpioUsed = Check_GPIOindex_Used(i); gpioIndex_html += "