Skip to content

Commit

Permalink
Merge pull request #14 from rliegmann/bug/esp32_pin
Browse files Browse the repository at this point in the history
Bug/esp32 pin
  • Loading branch information
rliegmann authored Feb 8, 2024
2 parents 4496481 + e41dd49 commit c8919e8
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
14 changes: 7 additions & 7 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ build_flags =
-DMATRIX_HEIGHT=8 ; Pixel rows
esp32_build_flags =
${common.build_flags}
-DLDR_PIN=A0
-DLDR_PIN=34
-DMATRIX_PIN=27
-DDEFAULT_PIN_SCL="Pin_D1"
-DDEFAULT_PIN_SDA="Pin_D3"
-DDEFAULT_PIN_DFPRX="Pin_D7"
-DDEFAULT_PIN_DFPTX="Pin_D8"
-DDEFAULT_PIN_ONEWIRE="Pin_D1"
-DDEFAULT_PIN_SCL="GPIO_NUM_22"
-DDEFAULT_PIN_SDA="GPIO_NUM_21"
-DDEFAULT_PIN_DFPRX="GPIO_NUM_17"
-DDEFAULT_PIN_DFPTX="GPIO_NUM_16"
-DDEFAULT_PIN_ONEWIRE="GPIO_NUM_16"
-DDEFAULT_MATRIX_TYPE=1
-DDEFAULT_LDR=GL5516
-DVBAT_PIN=0
-DVBAT_PIN=33
esp8266_build_flags =
${common.build_flags}
-DLDR_PIN=A0
Expand Down
30 changes: 15 additions & 15 deletions src/PixelIt.ino
Original file line number Diff line number Diff line change
Expand Up @@ -3497,36 +3497,36 @@ uint8_t TranslatePin(String pin)
#elif defined(ESP32)

if (pin == "GPIO_NUM_14")
return GPIO_NUM_14;
return (int)GPIO_NUM_14;
if (pin == "GPIO_NUM_15")
return GPIO_NUM_15;
return (int)GPIO_NUM_15;
if (pin == "GPIO_NUM_16")
return GPIO_NUM_16;
return (int)GPIO_NUM_16;
if (pin == "GPIO_NUM_17")
return GPIO_NUM_17;
return (int)GPIO_NUM_17;
if (pin == "GPIO_NUM_18")
return GPIO_NUM_18;
return (int)GPIO_NUM_18;
if (pin == "GPIO_NUM_19")
return GPIO_NUM_19;
return (int)GPIO_NUM_19;
if (pin == "GPIO_NUM_21")
return GPIO_NUM_21;
return (int)GPIO_NUM_21;
if (pin == "GPIO_NUM_22")
return GPIO_NUM_22;
return (int)GPIO_NUM_22;
if (pin == "GPIO_NUM_23")
return GPIO_NUM_23;
return (int)GPIO_NUM_23;
if (pin == "GPIO_NUM_25")
return GPIO_NUM_25;
return (int)GPIO_NUM_25;
if (pin == "GPIO_NUM_26")
return GPIO_NUM_26;
return (int)GPIO_NUM_26;
if (pin == "GPIO_NUM_27")
return GPIO_NUM_27;
return (int)GPIO_NUM_27;
if (pin == "SPI_CLK_GPIO_NUM")
return SPI_CLK_GPIO_NUM;
return (int)SPI_CLK_GPIO_NUM;
if (pin == "SPI_CS0_GPIO_NUM")
return SPI_CS0_GPIO_NUM;
return (int)SPI_CS0_GPIO_NUM;

Log(F("Pin assignment - unknown pin"), pin);
return GPIO_NUM_32; // IDK
return (int)GPIO_NUM_32; // IDK
#endif
}

Expand Down

0 comments on commit c8919e8

Please sign in to comment.