Hello,
Been a while, but I wanted to open up a general discussion on the stream class, does anyone know of any issues with this class and the Photon? Or any differences existing between the stream class on Core and Photon?
The issue I’m running into is, that the Photon I have runs through my main loop twice hitting a function, func_X, at the end of the loop. After running through func_X the second time my Photon hangs; Serial is not broken, it doesn’t continue to run through the loop, it just stops.
func_X utilizes the stream class, Serial1, and does basic buffer handling, using functions like readBytesUntil() and setTimeout(). Commenting out all parts of func_X that use the stream class removes this hang up and the code functions as normal.
What really spooks me is that I have this same function, func_X, on a Core and experience no issues.The ONLY difference b/n both setups is that the Core’s func_X uses Serial2 and the Photon’s func_X uses Serial1 (hence the bold question above )
Can’t post code just yet or I would have. As always , any insight is appreciated, even a point in the right direction. Thank you very much.