Page 1 of 1

Stream Function of Arduino equivalent in Arduino

Posted: Fri Sep 29, 2017 12:41 pm
by barometre
Hi,

I am looking for the equivalent base class Stream Arduino in ESP-IDF. As far as I understand Stream is creating a class for read only from UART buffer. How can I create equivalent function in ESP-IDF?

Thanks

Re: Stream Function of Arduino equivalent in Arduino

Posted: Fri Sep 29, 2017 1:50 pm
by kolban
Are you programming in C++? If so, I believe that the standard library functions of C++ are available to you which include I/O streaming:

Have a google on "C++ and iostreams".

For example:

https://www.cprogramming.com/tutorial/c ... reams.html

I have successfully used these with strings and files but haven't tested yet with UART. In theory it should "just work".

Re: Stream Function of Arduino equivalent in Arduino

Posted: Tue Oct 03, 2017 1:37 pm
by barometre
kolban wrote:Are you programming in C++? If so, I believe that the standard library functions of C++ are available to you which include I/O streaming:

Have a google on "C++ and iostreams".

For example:

https://www.cprogramming.com/tutorial/c ... reams.html

I have successfully used these with strings and files but haven't tested yet with UART. In theory it should "just work".
Hi,

Thank you for your reply, I make it other way around but I dont remember now how I did it. But in the future I will make as you posted.

Thanks again

Re: Stream Function of Arduino equivalent in Arduino

Posted: Fri May 06, 2022 9:20 am
by tezaman
Hi,
I am looking exactly the same stuff.
Can you share the solution for that?

Re: Stream Function of Arduino equivalent in Arduino

Posted: Sun May 15, 2022 11:30 am
by tezaman
is there anything ready to use for streaming data from uart?

Re: Stream Function of Arduino equivalent in Arduino

Posted: Tue May 17, 2022 10:07 pm
by nicklasb
tezaman wrote:
Sun May 15, 2022 11:30 am
is there anything ready to use for streaming data from uart?
Actually I am as well. Trying to run EspSoftwareSerial which needs stream.h, and there is nothing like that in ESP-IDF.