I’m trying to write a serial driver for an ATmega328P.
I can make it work. I give it a TAG I check that while it reads and a timeout so it does not continue forever.
The question is, what if I do not know what the response (TAG) should be? When is the message received?
Here is some of my code.
Here is an example of a device I communicate with (ESP-01)
I can see the TX line are hold high, when it reads. Is the solution to check when it goes low and then the message is received?