Two way Serial Communication

Im practicing two way serial communication between an Atmega and a nodeMcu
Can someone show me a simple descritption and code on how to accomplish this?

There is a fair amount of Serial communications topics and tutorials here in the forums.

There is no simple code to do this.
Do some search and studying of communication protocols.
You need to use some kind of "hand shaking" like the receiver acknowledge reception of message, receiver signaling when it's ready for the next message etc. If a message is corrupted or not reaches the receiver the sending device needs to handle that.

ATMEGA covers a bunch of AVR processors. Which one are you using?

Is your mystery ATMEGA 5V? Is NodeMCU 5V tolerant? If not you will need voltage level shifting between the ATMEGA TX and NodeMCU RX.

1 Like