For example, I would like to be able to type in terminal:
V=23041
And there should be handling that recognize "V=" and hence know that it is expecting one uint16_t or up to two bytes, before next CR/LF. Then receive 23041 , and convert to uint16_t , or store in two bytes.
I bet people have som code for this that can be used as template/example.
Have a look at the examples in Serial Input Basics - simple reliable non-blocking ways to receive data. There is also a parse example to illustrate how to extract numbers from the received text.
What alternatives are there to "V=" and what do they mean? What is the purpose of entering the data? Maybe there is a simpler way.