I am having an issue using serin().
Here is my code:
Here is the terminal output.
2:14:20 PM > 3A 04 31 32 33 34
2:14:25 PM < 31 32 33 34
You can see that the 4 bytes are echoed properly.
However, this code fails:
Here is the terminal output.
2:14:20 PM > 3A 04 31 32 33 34
2:14:25 PM < 00 33 34
You can see that the 3 bytes are not echoed properly, the first byte should have been 32, but 00 was output.
I suspect the issue is with the word width of the variable command, but would like some clarification on what I am doing wrong here.
Here is my code:
Code:
com_Init(combuf, 0, ':'); repeat until(com_Full()); // loop until buffer is full serout(serin()); serout(serin()); serout(serin()); serout(serin());
2:14:20 PM > 3A 04 31 32 33 34
2:14:25 PM < 31 32 33 34
You can see that the 4 bytes are echoed properly.
However, this code fails:
Code:
com_Init(combuf, 0, ':'); repeat until(com_Full()); // loop until buffer is full command := serin(); serout(serin()); serout(serin()); serout(serin());
2:14:20 PM > 3A 04 31 32 33 34
2:14:25 PM < 00 33 34
You can see that the 3 bytes are not echoed properly, the first byte should have been 32, but 00 was output.
I suspect the issue is with the word width of the variable command, but would like some clarification on what I am doing wrong here.
Comment