Difference in framerate between USB serial com port and bluetooth?

edited January 2016 in Arduino

Why would there be a difference in framerate speed when using the USB serial port versus using a JY_MCU Bluetooth serial device?

Here is part of my code:

String portName = Serial.list()[0]; //element 0 typically is my Bluetooth device, 2 is my USB serial port
myPort = new Serial(this, portName, 9600);
frameRate(100);

I am using the following to actually send data to my Arduino either on USB serial or Bluetooth serial:

myPort.write(pwmOutArray[pwmWriteIndex]);

When I run this with my USB serial com port, I get a framerate of about 100. However, when I run this same code using the Bluetooth serial device, the framerate is much slower: typically 20-35 frames per second, so the Bluetooth slows down code execution.

Can anyone explain this?
Thanks for your help.

Answers

  • Answer ✓

    Bluetooth 2.0 transfer speeds max out at about 3Mb/sec while USB 2.0 can reach up to 60Mb/sec. Bluetooth 3.0/4.0 can get up to 24Mb/sec. Faster but still slower than USB. Cheers.

Sign In or Register to comment.