Hi,
I'm wondering if the NXT motors can be controlled using a c/c++ program in real time. I have a project that contains several other c++ files which basically layout a maze for the robot to follow. I would like to read in the encoder values so that the numbers can be used in my other source files to calculate where in the maze the robot currently is. Then depending on the location in the maze i want to be able to send motor controls back to the robot. (all done through USB).
I'm basically setting up a maze for my robot to go through, only its all virtual. If this can not be done using the NXT controller brick any recommendations of how to do it with a different controller? i know adrinuo and legos popular but i dont know if adrinuo can be controlled this way either.
Any ideas?
Thanks
Remote control of motors using C/C++
Re: Remote control of motors using C/C++
Please use sensible post subjects, rather than "HELP". I've changed it on your post.
- Xander
- Xander
| My Blog: I'd Rather Be Building Robots (http://botbench.com)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
Re: Remote control of motors using C/C++
Lego has provided their API, and using their API it is possible to write code in C++ that will control your robot from your pc...but I'm not sure about having that code on the NXT brick. I know I've seen projects, like NXT OSEK (http://lejos-osek.sourceforge.net/whatislejososek.htm) that should allow you to have the code on your NXT, but I haven't tried this personally. Perhaps someone in the forums has and can report back with their experience? The only downside is that it's Windows only, no Mac support, no official Linux support.
Kami
Kami
I haven't grown past my playing with Legos stage and I don't think I want to
Blog: http://nuhlikklebickle.blogspot.com
Kami
Blog: http://nuhlikklebickle.blogspot.com
Kami
Re: Remote control of motors using C/C++
You can command the motors and sensors through the Bricx Center (http://bricxcc.sourceforge.net/) so possibly you could incorporate code from that into your own program.
OnBrick (http://www.pspwp.pwp.blueyonder.co.uk/s ... index.html) also allows remote operation of the NXT from a computer or pda so that code might be useful as well.
Googling 'remote operation of lego nxt' got a few hits as well.
OnBrick (http://www.pspwp.pwp.blueyonder.co.uk/s ... index.html) also allows remote operation of the NXT from a computer or pda so that code might be useful as well.
Googling 'remote operation of lego nxt' got a few hits as well.
A sophistical rhetorician, inebriated with the exuberance of his own verbosity, and gifted with an egotistical imagination that can at all times command an interminable and inconsistent series of arguments to malign an opponent and to glorify himself.
Re: Remote control of motors using C/C++
LEGO's driver has a C++ interface that lets you control the robot in realtime. It is available in Windows and on the Mac (not certain about Linux).
LEGO.com, Products, Mindstorms, Support, Files, Software Dev kits.
LEGO.com, Products, Mindstorms, Support, Files, Software Dev kits.
Who is online
Users browsing this forum: No registered users and 5 guests