DLuders Posted March 17, 2011 Posted March 17, 2011 John30340 posted this about a new way of programming the Lego Mindstorms NXT brick. "If you are not a fan of the VISUAL programming language that comes with an NXT, you will be excited that you can now use RobotBASIC to control the robot directly (NO downloads to the robot at all - everything is done through direct Bluetooth commands). The source code (and RobotBASIC) is FREE at http://www.RobotBASIC.com , but there is also a [bonanza] Book available for those that need it. This video demonstrates a FEW of the routines and projects discussed in the book.""If you are totally new to programming, or just want a short introduction to RobotBASIC, try this PDF TUTORIAL." "ROBOT CLUBS -- RobotBASIC has commands and functions to facilitate contests and competitions for Robot Clubs. This provides a great way to educate new members as well as increasing interest in robotics. We even have a section in Robot Programmer's Bonanza dedicated to using contests to motivate students and club members." The website outlines the advantages of RobotBASIC for many different applications: ● No installation is required – you can run RobotBASIC from a USB-drive, a CD, or even from a web page. ● Use variable typing (integer, float, and string) OR totally untyped variables, where ANY variable at ANY time can be changed to ANY type by simply assigning it a new value. ● Standard GOSUB routines or callable function-like routines (Call/Sub) with LOCAL variable scoping with by reference and by value parameters (which may be skipped), as well as a returned value. ● Use legacy INPUT and PRINT statements for QUICK and EASY I/O (great for introducing programming to non-programmers). ● GUI commands that create buttons, text boxes, edit boxes, list boxes, dialogue windows, message boxes, radio buttons, check boxes, sliders, and more. ● Use a Procedural programming model with GOSUB and CALL/SUB or an EVENT-DRIVEN approach with commands like OnSlider. ● Use standard BASIC syntax or a modified C-style syntax (i.e. ++, +=, !=, &&) This can be great for teaching programming fundamentals before moving on to more complex principles and syntax. ● Increased productivity from numerous “helper functions” that facilitate sorting, multimedia displays, flicker-free 2-D and 3-D animation, robot vision (including web cam support), extensive BMP image manipulation, matrix math, both high and low-level file I/O, the ability to send Emails (SMTP) and communicate over the Internet (UDP and TCP protocols), and much more. ● Develop and debug programs in an easy-to-use INTERPRETER-based IDE (Integrated Development Environment), then COMPILE your programs to standalone EXE’s for easy distribution. ● Ability to create includable LIBRARY files with #include (even include binary files to protect your algorithms). ● An integrated Robot Simulator with numerous sensors such as an electronic compass, ultrasonic distance measurement, IR perimeter sensing, line sensors, a GPS, and more. ● Control real robots using parallel, serial, and USB ports for wireless protocols such as Bluetooth and Zigbee. ● Unique proprietary protocol allows simulator programs (without modification) to control real robots (see our books and the HELP file for complete details). ● Direct support for the USBmicro U4x1 family of I/O modules that provide 1-wire, SPI, and I2C Serial control of Digital MicroDevices as well as 16 lines of TTL I/O (more information is available in the REAL WORLD CONTROL section below). ● Ability to SPAWN other executable files and pass them parameters. ● Over 800 commands and functions often allow a few lines of code to provide the functionality of hundreds of lines in many other languages. ● An extensive 300 page HELP file provides detailed information and numerous programming examples. ● Web page tutorials, sample programs, YouTube videos, and low-cost books provide additional help if needed. ● Improved editor with multiple file capability and color-coded keywords. ● RobotBASIC is FREE to schools, organizations, individuals - EVERYONE! Quote
JopieK Posted March 17, 2011 Posted March 17, 2011 I don't like basic. RobotC is much, much better. Look at the examples. Call something etc. is very ugly. Quote
Aqualize Posted March 17, 2011 Posted March 17, 2011 Sounds horrible. Among professional programmers BASIC is despised, I'm not sure how much this is related to the old BASIC flavors but it at least share the dreadful name. And they actually seem to brag about having over 800 commands and functions. To me it looked very unorganized. I prefer Java as leJOS NXJ on my NXT brick. I haven't tried it out but for beginners that want to write programs I guess pyNXC is a good choice as python is a quite simple language. C can be quite daunting with its syntax. Quote
Toastie Posted March 17, 2011 Posted March 17, 2011 (edited) Sounds horrible. Among professional programmers BASIC is despised Well ... my two cents. Professional programmers ... yeap, for you guys BASIC is despised. And you have very good arguments, I went through many of them, agreed. But this is ... LEGO. This is fun, this is about trying out things, this way or that way or any other ... I have RobotC. It is beautiful. Makes my RCX equipped trains run with real time PID loops controlling motor power. BUT: C code sucks s**t. Code is lightning fast (depending on code-to-brick-firmware translation of course), efficient, and can be programmed in a way that even Gods of C have a hard time reading the code (is that good or bad?) I may be very wrong on this, but I am lucky to own a couple of NXT bricks, and some of the other PBrick beauties as well. I am NOT a professional programmer, in contrast. As so many other AFOLs though, I simply like to get things going. Some trick here, some plain vanilla solution there, some advices from others and: BOOM my MOC is actually the most beautiful creation in the world - just for me of course. So I simply choose what I see fit: NQC for all purpose, RobotC for high performance, and everything else for fun. Just because it is called "BASIC", hmmm - I have learned to get a computer do what I want with BASIC on a PDP10 cluster, QBASIC on a very early-on IBM PC, VB6.0 on my first laptop and now VB-dot-what-ever on this one. I am an amateur, self learner, non-professional LEGO enthusiast. I will definitely try RobotBASIC out! Thanks for sharing DLuders, I entirely missed that! All the best, Thorsten Edited March 17, 2011 by Toastie Quote
RobotBASIC Posted September 1, 2011 Posted September 1, 2011 We at RobotBASIC LOVE C too.... RobotBASIC is written in C++. In order to help students transition from something EASY like RobotBASIC, we actually have included many C-style syntaxes that can be freely mixed with the BASIC syntax.... RobotBASIC has nearly 1000 commands and functions - FAR more than most language. There are MANY things that take massive amounts of code in C that can be done in ONE line in RobotBASIC - because WE wrote all the C code for you. We know its not for everyone, but we think we offer a lot to many people. If you let people learn to do things with an easy to use, fantasticaly productive language, then many will move on to C or Java or whatever.... but you might be surprised at how many people find they can create fantastic programs in a fraction of the time just by using RobotBASIC.... and besides RobotBASIC is FREE.... instead of trashing things YOU think are beneath you, perhaps you could consider motivating those new to programming. Unfortunately there are less and less people considering careers in Math, Physics, Engineering, etc.... we all need to do our part to encourage the programmers of tomorrow - we give RobotBASIC away to EVERYONE because we want more young people to consider the fields we have loved over our careers. I invite your comments.... John I don't like basic. RobotC is much, much better. Look at the examples. Call something etc. is very ugly. Quote
Toastie Posted September 4, 2011 Posted September 4, 2011 We at RobotBASIC LOVE C too.... RobotBASIC is written in C++. Hi John, that was a very nice post ... it reminds me a little (no, a little more) on how I - as chemist, and not IT-guru - look at these things: We have to get things going. As chemist, I know s**t about C-finesse. And I find C really, really hard to learn, and more importantly, to memorize - knowing that I need this particular piece of code now and probably never again. It has been and it will always be an "I/We believe in" question: Programming languages. The Gurus are probably right: C is the way to go. You know what? As purist, I'd say Assembler is the way to go. Once you have all time of the world, you probably can beat the output of a C-compiler with respect to code optimization and performance, at least that was the case in the olden days. Most important to me is: A couple of basic, powerful commands to get simple things going, accompanied by matching documentation. And then, further on: Unlimited command sets for the tough stuff. "RobotBASIC is written in C++" ... I LOVE that one. Best regards, Thorsten Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.