Writing to Arduino not sending complete parameters when it's a string.
I'm using Windows 10, Unity 2020.3.5f1, Uduino 3.3.2
I'm sending sending a string using this: (ignore the dummy text)
UduinoManager.Instance.sendCommand(PrintMsg, "Google_is_a_company");
and in the arduino:
void PrintMsg()
{
Serial.println( uduino.getParameter(0));
}
I am repeating this command, and seeing the last received message and last sent message on the Uduino inspector. The sent message is being sent correctly appearing as "Google_is_a_company", the received message from the serial.println sometimes prints the complete string, sometimes it prints only part of it like "G" or "Go". This is a string because it's being sent to and I2C LCD, however the error occurs even without this part of the script. The setup also seems to be working. The only that seems to have the problem is the message being sent. Also sometimes when too many messages are sent it seems that it will just stop printing (and changing the text in the case of the LCD). But I think I still have to test more on the read/write timeouts to solve this. I'm not entirely sure if is a bug or something wrong on how I'm sending the message. Any idea what I should do?
Thank you
Comments (3)
-
-
repo owner Hello,
This was a limitation of the maximum buffer of Uduino. I fixed it in this version, and it will be updated in the next version on the asset store .
Link : https://mteys.eu/index.php/s/yFwezYESKJZ6rEW
Replace Uduino.h and Uduino.cpp in Arduino/libraries/Uduino folderBest,
Marc
-
repo owner - changed status to resolved
- Log in to comment
Hello, I’m the original poster. After some more testing, I think that the bug happens whenever I send a string with a length of 24 or higher to arduino. then arduino starts behaving oddly and cropping the string messages it receives.
Any ideas why or how I can change this limit?
Thanks