Skip to content

jacobrosenthal/MergedStreams

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MergedStreams

Make an Arduino stream which writes reads and writes from two streams. The first stream will get read and write preference.

Note

This libarary is very much in beta. It hasn't been fully tested nor are all Serial class methods implemented yet.

Install

As usual, download zip, unzip and rename to remove the dash character and place in your Arduino Libraries folder, on MacOSX ~/Documents/Arduino/libraries/

Use

First stream argument will get priority.

MergedStreams mergedStreams(Serial, Serial);

Then use it just like a stream.

mergedStreams.write('a');
Serial.println((char)mergedStreams.read());

About

Make an Arduino stream which writes reads and writes from two streams. The first stream will get read and write preference.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages