Reading a serial device with the Due

I have a digital meter whose output I'm trying to read with the Arduino Due. If I plug the meter into my PC directly and then open the COM port with putty, I can see that the meter is continuously outputting data from its USB-B port. However, when I try to read the data from the native USB port on the Due I get nothing. My code is just opening SerialUSB and then checking if SerialUSB.available is ever true, which it isn't. I think I should use USBHost but I cant figure out how to use it for something besides a mouse and keyboard. What should I change so that I can read the data? Thanks for the help!

First, welcome to the forum.

What should I change

If you are asking us to guess, how about changing line 23. :P


Paul

Well, like I said, all my code does is check if SerialUSB.available() is ever true and prints a message if it is. I assume I'm missing something which is why I didn't bother posting code I know doesn't really do anything. Anyway, since you insist:

void setup() {
  Serial.begin(19200);
  SerialUSB.begin(9600);
}

void loop() {
  if (SerialUSB.available()) {
    Serial.println("yay");
  }
}

I plug the meter into the native USB and then open the serial monitor, and nothing ever prints.