I'm trying to wrap my head around some concepts related to serial communications.
For example, if I'm communicating with a WiFi adapter (an ESP01) and sending "AT" commands to it,
I know that I need to define a char array to hold the bytes that I receive from it via commands such as "ESP01.read()".
Question 1: How do I know when that device is done sending data back to me?
Question 2: Do I need to incorporate a delay to make sure I don't empty the buffer before the response is completely sent?
Question 3: How do I know in advance how large to make my char array? Is there some way to make the array grow dynamically as more space is needed?