Page 1 of 1

Problem with connet nxc with PC bluetooth

Posted: 28 Mar 2011, 18:44
by sniperdigital
hey guys

i'm new to nxt & NXC language i need help if you can

first:
i have color sensor for detect color and this is the code for detect color
task main()
{
string sColor ;

while (true){
ClearScreen();
SetSensorColorFull(IN_3);
int sensor_value=Sensor(IN_3);
switch (sensor_value )
{


{
case 1: sColor = "Black"; break;
case 2: sColor = "Blue"; break;
case 3: sColor = "Green"; break;
case 4: sColor = "Yellow"; break;
case 5: sColor = "Red"; break;
case 6: sColor = "White"; break;
default: sColor = "???"; break;
}
TextOut(0, LCD_LINE2,sColor);
Wait(500);
}
}
}

i wanna ask you can i send this color to the computer through bluetooth with every color do something like if detect green color open any program like photoshop or anything else and i can send maybe red color to program maybe programmed by c++ the function if then program if (color ==red ) cout << "Color is red"; this is my idea i hope help me if you can !!!

plz help me by anything until is resources !!!

Re: Problem with connet nxc with PC bluetooth

Posted: 24 Apr 2011, 09:30
by timpattinson
If you're interested in programming it in c++ try this
http://www.norgesgade14.dk/bluetoothlibrary.php
It can be added to a C++ program to get data from the NXTvia Bluetooth and retrieve sensor values, etc
-Tim