I tried to connect a sensor to the UART port of WiFi Kit32 board (V2) via UO_TXD (GPIO03) & UO_TXD(GPIO01).
After I connect the sensor, I can no longer download firmware through Arduino IDE. Any suggestion?
I tried to connect a sensor to the UART port of WiFi Kit32 board (V2) via UO_TXD (GPIO03) & UO_TXD(GPIO01).
After I connect the sensor, I can no longer download firmware through Arduino IDE. Any suggestion?
I studied the schematics and realize that the U0_TXD(GPIO1) and U0_RXD(GPIO3) are tied to U2 (CP2102) pin#26 (TxD) and pin#25(RxD). I guess the serial port via USB is shared with the UART port labelled on the header. This explained the “firmware download” problem.
So I cannot use this port to connect to a sensor while the USB cable is plugged in. I have to remove sensor during firmware download. Then unplug USB cable, connect sensor to the UART port on the header and operate the board by battery power.
Is this correct?
Continue on the previous subject of UART port sensor interface.
In order to avoid connecting and disconnecting sensor during firmware upload, I move the sensor to UART1 port (Rx-GPIO2, Tx-GPIO17) based on the example code “serial2.ino”
// Serial1.begin(unsigned long baud, uint32_t config, int8_t rxPin, int8_t txPin, bool invert)
Serial1.begin(9600, SERIAL_8N1, 2, 17);
The sensor responds but the data is not correct. The code works fine for the original UART port (Rx-GPIO3, Tx-GPIO1). Do I need to setup anything else in addition to the Serial1.begin() ?
You try to use another serial port.