Esp hardware serial: set TX pin LOW manually

i use pin 19 as TX on esp32 to send data to "df player module" (uart)

` mp3_serial.begin(9600, SERIAL_8N1, -1, 19); // Begin serial communication

then when i dont need "df player module" i need to set pin 19 to low

digitalWrite(19, LOW);

so after this even if i set digitalWrite(19, HIGH); i cant communicate with df player module

is there any other way to set TX pin to low when i dont use serial communication with df player or this is the way and then need to do something to enable uart communication again

Why mess around with the Tx pin ? When you don't need DF Player simply don't write to it.

it consume lot of power, coz im in battery. i use pnp to stop dfplyaer but it still has power because of txt pin. when i set txt pin to low then df player dont consume power

Is the DF Player really getting power from the Tx pin ?

what happens if you use Serial.begin() when you want to start using the Serial interface again ?

yes

this is what i wanted to ask. if this is the way to do it do i need call serial.begin again or there is any other way to make pin low

I have no idea whether it will work. Why not try it ?

even if u stop vcc to df player. it still consume energy while tx pin is connected there, this is known issue of df plyaer.

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