I want to implement a function in another micro-controller which works like serial.available(). I don't know how it works. I read about Serial.available() in this link.
Whenever I write a string on the terminal, it prints the length of the string. Can anyone tell me how it works?