opening Bricxcc help: why getting RCX / NQC topics?
Posted: 25 Feb 2011, 20:31
if I'm opening the Bricxcc help why am I getting RCX / NQC topics and not for NXT / NXC?
Bricx Command Center
version 3.3
Written by John Hansen
(Based on code originally written by Mark Overmars)
Bricx Command Center (BricxCC) was written to more easily work with the Lego MindStorms, CyberMaster, and Spybot robot systems. It is built around NQC (Not Quite C Compiler), written by Dave Baum, that makes it possible to program the RCX, the Scout, the Cybermaster, and the Spybot programmable bricks in a language that is close to C. For more information on NQC, see the tutorial and NQC reference guide provided. BricxCC also supports programming these bricks via MindScript and LASM, LEGO's own programming languages, via the LEGO MindStorms SDK 2.5.
The foundation of BricxCC is a full-featured programmer's editor in which you can write your programs with the integrated ability to compile the programs and download them to the brick. In case of errors they are reported at the bottom of the editor window such that they can be corrected easily. In addition to providing an editor, BricxCC contains tools to control your robot directly, to watch what is happening in the brick, to download (new) firmware, etc.
To run BricxCC it is not necessary to have spirit.ocx (the ActiveX control used with the RIS 1.0 and 1.5 sets) registered on your system.
BricxCC can be used free of charge. Please note that NQC and it documentation are copyrighted by Dave Baum & John Hansen. BricxCC supports version 2.3r1 or later of NQC. See the readme file for more information on copyright and distribution issues. Please send your comments to [email protected]. See the web page
http://bricxcc.sourceforge.net/
for more information.
Sending Messages
The RCX and the Scout can react to messages. One RCX or Scout can send messages to another. But also the computer can send messages to the RCX/Scout. To use this feature, write an NQC program that looks at messages and makes to robot take action accordingly. For example, use the following program:
task main()
{
while (true)
{
ClearMessage();
until (Message() != 0);
if (Message() == 1) {OnFwd(OUT_A+OUT_C);}
if (Message() == 2) {OnRev(OUT_A+OUT_C);}
if (Message() == 3) {Off(OUT_A+OUT_C);}
}
}
It waits for a message not equal to 0 and then takes action according to the number of the message. Now choose Send Messages from the Tools menu. Click on the right number button to send the corresponding message. If you want to send a message larger than 9, choose it with the up and down arrows (or type in the desired message number) and press the button labeled Send.
Please note that sending messages is relatively slow. It takes about half a second before the robot reacts.