I have a sparkfun.com/commerce/product_info.php?products_id=8180 . I've written code before that handled serial fine, but for some reason I cant get processing to take any data off of the buffer.
I've tried using the usual serialEvent, but it never gets called, so I thought I'd check in draw() for .available() and then just tried using .read() without even checking. However, no matter what I try, processing simply will not read from the buffer of this device.
I'm able to send data to it, I can even get it to connect to another BT device and send data across the link, to an arduino that responds, even. I can configure the device, but get no response from it, as processing won't read from the buffer.
When I open hyperterminal with the same port settings, it reads everything that was in the buffer, and works like you'd expect. I've even tried varying the baud rate (9600,57600,115200).
Any help would be greatly appreciated.
Processing 1.0.9, Windows 7x64, FTDI 2.06.00 (tried 2.02.04 as well)
--Edit--:
I've also tried Vista x64, with similar results
Code:import processing.serial.*;
static String COMPORT = "COM4";
Serial myPort;
void setup() {
size(200,200);
myPort = new Serial(this, COMPORT, 9600);
}
void draw() {
background(50,100,200);
}
void keyPressed() {
if (key == 65535) return;
myPort.write(key);
}
void serialEvent(Serial myPort)
{
int data = myPort.read();
println(data + " : 0x" + hex(data,2) + " : '" + char(data)+"'");
}