Closed Sprinterfreak closed 8 months ago
@Sprinterfreak You can assign any compatible pin and now it is using Serial2: https://github.com/dzungpv/mitsubishi2MQTT/blob/6e3e7f242298d2094cf3694d3608f4bd96d5a51c/main/main.cpp#L265C19-L265C26, I often use 26, 27 or 19, 23 on ESP32 without any problem.
That is only partially correct. It uses Serial1 if it has default settings loaded rx, tx = 0, 0.
You set pin other than 0 and it work. I will fix this by using Serial by default.
S2, C3 and C6 only have 2 hardware serial so code must be change
I close it because of https://github.com/dzungpv/mitsubishi2MQTT/commit/cdd28bd97bd292a478b51a43f5e17d5dc8cddc68 You can open it if still have problem.
The thing is you MUST NOT set up Serial1 with default pins as this will destroy communication between the cpu and internal flash. GPIO9/10(D2/D3), which are default for Serial1, are reserved for SPI flash access.
It is not using GPIO 9 and 10 in the latest update, it using UART0 by default and UART1 if you set the uart pins in the Setting. You can see readme.md
The default &Serial1 (GPIO9/10, SD3/SD2) can not be used on ESP-WROOM-32. GPIO9/10 are part of internal connections to its integrated spi flash.
https://www.espressif.com/sites/default/files/documentation/esp32-wroom-32_datasheet_en.pdf
Either use &Serial as default or initialize &Serial2 on GPIO2/4 for instance?