I’m making a device which is having multiple sensors (i.e PING Sensor, Compass etc;) . But the problems arose are, ,
1. How to Connect to the PC
for this I’ve used the following code fragment,
void InitBluetooth()
{
// Keep a quick reference to the Bluetooth client, to make it
// easier to send commands back over the module
//bluetooth = new Bluetooth(9);
client = bluetooth.ClientMode;
// Set the Bluetooth device name to make it easier to identify when
// you pair this module with your phone
bluetooth.SetDeviceName("MyDevice");
bluetooth.SetPinCode("1234");
// We want to track when we are connected and disconnected
bluetooth.BluetoothStateChanged += new Bluetooth.BluetoothStateChangedHandler(bluetooth_BluetoothStateChanged);
// We want to collect all the data coming in
bluetooth.DataReceived += new Bluetooth.DataReceivedHandler(bluetooth_DataReceived);
}
But It’s showing and Exiting with 0 after changing the BTSTATE from 1 to 3…
Hi,
I’m working on a similar application for some time. I hope that I can post it here in the next days.
Roland
@ Brett – Hi, I used your “Minimal Gadgeteer Bluetooth module test app” from the link above with minor modifications. Your valuable app cannot be found under the tag “bluetooth”. You should add this tag to your project.
@ apprentice - if you give me your e-mail address, I can send you my programs to test. It’s an application for the spider that sends data to the PC via bluetooth and an application in C# for the PC that receives the data and stores them in a xml database. There are still some bugs in the program for the PC which I want to eliminate before I post it.
@ Justin - yes, gmail. I know that there may be no .exe files but I always forget to delete some of them. Is there an automatic way to make a project sendable.
@ RoSchmi - not that i have found… They don’t allow things like .vb etc, think .cs is ok but there are a few Visual Studio file extensions that they block.