Problem with connet nxc with PC bluetooth

Discussion specific to projects ideas and support.
Post Reply
sniperdigital
Posts: 1
Joined: 28 Mar 2011, 15:35

Problem with connet nxc with PC bluetooth

Post 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 !!!
timpattinson
Posts: 224
Joined: 30 Oct 2010, 04:10
Location: 127.0.0.1
Contact:

Re: Problem with connet nxc with PC bluetooth

Post 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
Commit to Lego Mindstorms StackExchange Q&A http://area51.stackexchange.com/proposals/4105
Minboards IRC Channel #mindboards on Freenode
My blog: http://timpattinson.wordpress.com/
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests