iopsrus.blogg.se

Gambas Serial Port Send
Gambas Serial Port Send




Gambas Serial Port Send

Hardware can generate unexpected results, so you might get more than 4 bytes.

Gambas Serial Port Send

Data can be lost, so you only might get less than bytes. I'm saying that that might not even work. So what your saying is the only way is to read it all is to iterate the read 4 times to get my stream of data? I havent changed anything and my code to read it is quite standard and straight forward: I should be getting up to 128 characters through the serial buffer but it doesnt seem to be the case. Now if I use Tera Term and send the commands through there I get the whole stream in one go as I should. If I continue to press the button I eventually get the rest after a total of 4 button presses which look like this on the serial monitor:

Gambas Serial Port Send

I am expeciting to recieve a hex stream that should be 7120A031, however what I find is the Serial monitor only sends back 71. Using a button connected to one of the digital i/o pins correctly configured and all that. For example I am sending:Ĭonst unsigned int STATUS_SEND = I am sending a simple command over the serial port on a Mega 2560 over Serial1 to a device which returns a serial response back. I have an issue which is simple but perplexing at the same time:






Gambas Serial Port Send