I am using a Seeed Bluetooth shield (http://www.seeedstudio.com/wiki/Bluetooth_Shield
) on my Arduino Due. So far I have had success connecting to a PC and sending data from the Arduino in my main program loop. However, for the project I am working on, I need to send data at a 1kHz rate. I have done this by setting up a timer compare interrupt to fire every millisecond.
My problem is that when I upload the sketch, the Bluetooth shield has to establish a connection first and I think the interrupt is messing up the system somehow. The shield has some indicator lights that flash for different statuses (Alternating red and green LED blinking = device inquirable, 2 flashes of green LED/second = Idle state, 1 flash green LED/sec = Active state). When I upload the sketch, the shield will only blink for about 4 seconds until the lights turn off completely and do nothing from then on out. I have tried to open the COM port I am using but it won't open (the Arduino isn't connected I am assuming).
In the setup loop there is a "setupBlueToothConnection" function for the shield. I disabled global interrupts so the interrupt wouldn't get in the way, but haven't had any luck.
I wrote another sketch using the same interrupt to send data to the PC over a USB serial connection and the program works fine.
I was hoping you guys would have some ideas of what I could do to fix this issue.