Can a serial command library be used for multiple serial ports at the same time?


in 1 of projects need use multiple serial ports of arduino send/receive commands other arduinos.
i used library: serialcommand (#include <serialcommand.h>) , works 1 port.
it seems run automatically on serial (serial0) port.
it possible have multiple instances of library run simultaneously in same program, 1 running serial , 1 serial1?
so far, cannot see link serial port.

if do:
serialcommand scmdin;
serialcommand scmdout;
i'm afraid both instances run on same serial

any appreciated.
i'm interested in other libraries can accomplish problem.

sorin

salut, this..

#include <softwareserial.h>

softwareserial serial1 (1, 2); // rx, tx
softwareserial serial2 (3, 4); // rx, tx


Arduino Forum > Using Arduino > Programming Questions > Can a serial command library be used for multiple serial ports at the same time?


arduino

Comments