Hi
I am doing a project, where I need to send a String variable by UART, in this component you have to determine the waiting time and the length of the chain, but what happens when the length of the chain varies, that is, sometimes it receives 4 another 7 another 2?
How could I receive a String variable that can be variable
Thank you
String variable by UART
Moderator: Benj
-
- Valued Contributor
- Posts: 1200
- Joined: Wed May 31, 2017 11:57 am
- Has thanked: 70 times
- Been thanked: 440 times
- Contact:
Re: String variable by UART
See https://www.matrixtsl.com/mmforums/view ... it=uart%21 - there are examples of receiving a variable length 'string' and converting this to a number. The 'trick' is to have a 'marker' for the end of string (for example a newline character)
Martin
Martin