I am working on arduino UNO with bi-directional communication with a raspberry pi and I was attempting to read a string from the Rpi instead of the normal single characters that I usually do (with success) .
When I attempted to read a string from the RPi I noticed that I could not read the full string . If I sent the string (from the console) “c1234567” my Uno would only get “c127”. This behavior was consistent with all serial communication methods it doesnt matter if I used Serial.read() or Serial.readString the result would be the same. Meaning I could only get the first 3 characters of the string plus the last one when ever I would send the Uno a “String” (individual chars worked perfectly)
I worked all day on this and realized that since I am also using SoftwareSerial that the combination of these two has cause problems in the past so when I removed the lines of code dealing with SoftwareSerial the regular serial input is now getting the whole string “c1234567”
What could be going on ?
I’m using arduino 1.01 on raspbian and I have tried NewSoftSerialc10 (it did not work at all) Windows does not have this issue but, Im running 1.67 there.
Here is the code snippet that works on windows(1.67) but not in raspbian(1.01):
SoftwareSerial SWSerial(NOT_A_PIN, 4);
SabertoothSimplified ST(SWSerial); //open a serial COM on previously identified pin
val1 = Serial.readString();
Serial.print(“string input :”);
What could be causing this odd behavior ? I keep reading that all previous issues with softwareserial conflicts were solved in 1.0 so I really shouldn’t have to add “NewSoftSerial” third party lib… correct ?