My setup is:
- -SoftwareSerial on pins 10 and 11 for the ESP (both the module and the interface running at 9600)
-Serial connection is left free for USB debugging messages.
What happens:
I'm able to communicate just fine with the ESP, both input and output, up until the point that it returns the data requested from a GET. For some reason I can't get anything when attempting to readBytes() or even just read(). readString() returns gibberish... sort of. While I don't have my stuff with me at the moment to give an exact output, something like "This is a test" becomes "ths s a es".
What's going on here? Only the contents of the doc I'm receiving gets garbled. The rest of the message (header info, etc.) is completely legible. I once tried sending a string of numbers and parseInt() iterating through the entire message wound up with a string of a bunch of nonsense integers (of course) but concluded by the correct number string sequence. My guess is that I'm misusing readString() and am just being too lazy, but I'd love to be told that from someone who knows better before I make things a bit more complicated.
(Note: When I have the ESP connected directly via serial to my computer, the message is correctly received. Is this a SoftwareSerial limitation?)