Serial Transmit on Due stops working after using pinMode
gayatrimenon opened this issue · 1 comments
gayatrimenon commented
Hi,
Tx for Serial3 for Arduino Due doesn't work after using pinMode on the pin. No issue is there for receiving. I only faced this issue on Arduino Due, not on Mega or MKR boards. Please see the reproduction code below:
I have TX3 and RX3 shorted on the Due.
void setup()
{
Serial.begin(9600);
pinMode(14,OUTPUT); //14 is TX3
Serial3.begin(9600);
}
void loop()
{
Serial3.write(65);
delay(1000);
if(Serial3.available()>0)
{
Serial.println(Serial3.read());
}
else
{
Serial.println("No Data");
}
}
Serial Monitor displays only "No Data". Now comment the line
pinMode(14,OUTPUT); //14 is TX3
The serial monitor starts printing 65 as expected.
I am using Arduino 1.8.8.
Please let me know if there is something I am missing.
Thank you
Regards
Gayatri
ajax-mazurenko-o commented
Have you been able to resolve this issue?