Page 1 of 1

Whats the best typed language to learn?

Posted: 11 Oct 2010, 06:47
by thekodyking3000
I was just wondering whats the most powerful and still somewhat comprehensible typed language for nxt.

Re: Whats the best typed language to learn?

Posted: 11 Oct 2010, 07:11
by mightor
thekodyking3000 wrote:I was just wondering whats the most powerful and still somewhat comprehensible typed language for nxt.
It depends on many factors:
  • What is your previous experience with programming any language?
  • What is your budget?
  • What operating system do you have on your computer? Linux, Windows, OSX, etc
  • What are your goals?
  • NXC is a great free programming environment, it runs on a variety of OSes. It uses the standard Lego firmware or an enhanced one for additional functionality
  • ROBOTC is a commercial programming environment featuring a debugger and requires its own firmware to be installed on the NXT. It only runs on Windows
  • Lejos is a Java programming environment. It's Open Source and free. It also requires you to install a custom firmware on the NXT.
There are many others out there, but these are the three main ones. Please note that installing a new firmware is really easy and completely reversible, so don't be put off by that. All the above can be used for robots ranging from the more mundane shooter bots to advanced path finding robots that communicate with other robots via BT.

Regards,
Xander

Re: Whats the best typed language to learn?

Posted: 11 Oct 2010, 18:46
by thekodyking3000
My dad (loopymech) set up NXC yesterday, but which language is the best for AI?

P.S. this would be the first typed language I've ever really learned.

Re: Whats the best typed language to learn?

Posted: 11 Oct 2010, 19:05
by mightor
AI is not dependent on any particular programming language, use whatever your dad can help you most with :)

- Xander

Re: Whats the best typed language to learn?

Posted: 11 Oct 2010, 19:13
by mattallen37
I almost only use NXC, and it is great.

Re: Whats the best typed language to learn?

Posted: 12 Oct 2010, 01:32
by alpharhino
If you choose ROBOTC or NXC I would recommend the book Absolute Beginners Guide to C.

Re: Whats the best typed language to learn?

Posted: 12 Oct 2010, 01:36
by loopymech
I recall seeing a nice table or two showing the available NXT
Programming Software, and as luck would have it, it is still here:

http://www.teamhassenplug.org/NXT/NXTSoftware.html (thanks to Steve & Co.)



-Loopy


p.s. I was trying to find out if some third-party sensors I have
(from hitechnic and mindsensors) were well supported by NXC or some of
the other languages. I found NXC libs for most of them on the sites,
but I am not clear on support for the HT Compass Sensor (NMC1034).
The site (http://www.hitechnic.com/cgi-bin/commer ... ey=NMC1034) shows...

Other Programming Environments

...
...

NBC

Next Byte Code (NBC) is a simple programming language that can access
all compass features. For more information go to
http://bricxcc.sourceforge.net/nbc/.



...but there is no mention of NXC. Does someone know if the HT
Compass is supported by NXC and where to find libs?

Re: Whats the best typed language to learn?

Posted: 12 Oct 2010, 01:46
by mattallen37
loopymech wrote:...Does someone know if the HT
Compass is supported by NXC and where to find libs?
I know for a fact that it is supported by NXC. You don't need a lib file to use it, you can just upgrade to the latest BCC, and it has full support. You can use other I2C stuff with NXC as well, and you don't need lib files to do so. You can completely build the code yourself to do what you need.

Re: Whats the best typed language to learn?

Posted: 12 Oct 2010, 08:56
by gloomyandy
The language comparison table is a little out of date these days so use it with care (if anyone is brave enough it would be good to have an updated version)...

Re: Whats the best typed language to learn?

Posted: 12 Oct 2010, 11:41
by HaWe
NXC is excellent for beginners and advanced programmers - and it's free..
RobotC is similar, but it costs money.
LeJos / Java and all the other languages/platforms I would recommend only if you're already widly experienced in programming.
BTW, I wrote 2 of my AI programs in NXC (a* and a neural net).
HTH!