Using/Setting up 2 serial ports simultaneously?
in
Integration and Hardware
•
6 months ago
Hi I'm just wondering is it possible to use 2 serial ports at the same time. I have an rfid reader plugged into 1 usb port and I have an arduino with a sensor in a second usb port and I'm just wondering is it possible to use these 2 ports and what kind of set up I would have to include to do so. I have already attempted it by opening the port in the same fashion just choosing a different serial port in the code but am currently having no luck.
- //Arduino
myPort = new Serial(this, Serial.list()[0], 9600);
oscP5 = new OscP5(this,12000);
myRemoteLocation = new NetAddress("127.0.0.1",12000);
//RFID
String portnum=Serial.list()[1];
myPort2= new Serial(this, portnum, 9600);
myPort2.buffer(16);
1