the output pins are not effected by serial reading

mohammed-ali:
can i have that coding to see the differences?

Sure, it is common code.