I'm trying to communicate between an Arduino Uno and an ESP8266 wifi chip via serial connection. Currently I'm having the ESP print the line "Serial Connection established" to Serial and having the Arduino read this via SoftwareSerial and print it to it's own Serial connection for me to see.
This does not work when using SoftwareSerial.readString(); I get no output. When using SoftwareSerial.read() I get the following string of numbers which I don't think I'm supposed to get? 83 101 114 105 97 108 32 67 111 110 110 101 99 116 105 111 110 32 101 115 116 97 98 108 105 115 104 101 100 13 10
Any idea what's going wrong? Not entirely sure what I should be getting from SoftwareSerial.read() either so any resources on how to interpret that would be appreciated.
Have you tried converting those values to ASCII?
(I only ask, because you didn't make it clear what you expected)
Hint: Serial.read returns an int, so that's the type that .print prints
Ok thanks that means I'm successfully transmitting my message through serial .
Unfortunately it doesn't help with getting readString() to work. I could do everything one char at a time I suppose but it seems a bit easier to work in Strings.
Here's an example of serialStr. Non blocking, hands you back a complete c string when its done to any function you name. Should work with software serial.