Uart2 does not wirk correctly

I have a project with ESP32 C3mini and a IR sensor with UART which is connect to Serial1
e.g.
#define RXD2 7 // Serial Input IR sensor ESP32 C3 supermini
#define TXD2 10 // Serial
Serial1.begin(9600, SERIAL_8N1, RXD2, TXD2); // IR Sensor

In VSC the sketch works fine but not in IOT.
Seems that IO7 is occupied by somthing else.
An idea?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.