Stream Function of Arduino equivalent in Arduino

barometre
Posts: 22
Joined: Mon May 09, 2016 11:22 am

Stream Function of Arduino equivalent in Arduino

Postby barometre » Fri Sep 29, 2017 12:41 pm

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

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

Re: Stream Function of Arduino equivalent in Arduino

Postby kolban » Fri Sep 29, 2017 1:50 pm

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".
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

barometre
Posts: 22
Joined: Mon May 09, 2016 11:22 am

Re: Stream Function of Arduino equivalent in Arduino

Postby barometre » Tue Oct 03, 2017 1:37 pm

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

tezaman
Posts: 7
Joined: Fri May 06, 2022 9:18 am

Re: Stream Function of Arduino equivalent in Arduino

Postby tezaman » Fri May 06, 2022 9:20 am

Hi,
I am looking exactly the same stuff.
Can you share the solution for that?

tezaman
Posts: 7
Joined: Fri May 06, 2022 9:18 am

Re: Stream Function of Arduino equivalent in Arduino

Postby tezaman » Sun May 15, 2022 11:30 am

is there anything ready to use for streaming data from uart?

nicklasb
Posts: 10
Joined: Sun Apr 24, 2022 9:11 pm

Re: Stream Function of Arduino equivalent in Arduino

Postby nicklasb » Tue May 17, 2022 10:07 pm

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.

Who is online

Users browsing this forum: No registered users and 268 guests