Serial Bluetooth Very Slow
in
Integration and Hardware
•
7 months ago
Hi. So I got a sparkfun RN42-XV Bluetooth Module for wireless robotics. I powered it up with an arduino, plugged in the RX and TX, wrote some code for the arduino to toggle an LED on and off a light when it received serial data, and configured the bluetooth module with my computer's bluetooth. I made a serial port for the device which was added to the serial list (I'm on a mac running OS 10.7.5 btw). I selected the port and used the processing serial library to write to it.
The light toggled and the data transferred but it sent at about 2 or 3 bytes per second. I tried my USB ports and the /dev/tty/Bluetooth-PDA-Sync and they worked just fine at good speeds. What is causing this and how can I get the modules to work at reasonable speeds?
Thanks,
Sam
Code below:
import processing.serial.*;
Serial myPort;
int i = 0;
void setup()
{
String portName = Serial.list()[6];
for(int i = 0; i < 8; i++)
{
println(Serial.list()[i]);
}
myPort = new Serial(this, portName, 9600);
}
void draw()
{
}
void keyPressed()
{
if(key == 'w')
{
myPort.write(i);
println(i);
i++;
}
}
1