Preprocessor Defines

Revision as of 22:03, 4 January 2012 by Bfeher (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Main >> Preprocessor Defines

The ROBOTC Compiler supports several different preprocessor defines that contain information about the compile time environment. Recently added are defines that indicate which features are enabled in the IDE.

The predefined symbols can be used in include files ad user programs for conditionally compiling code based on features. The preprocessor defines include:

Connecting Two NXT Bricks

1. Use the NXT user interface to select Bluetooth commands.
Bluetooth connect 1.gif
2. The top left of the NXT LCD status display shows the Bluetooth status. The leftmost icon is the BT symbol and indicates that BT is enabled on the NXT. The icon indicates that the NXT BT visibility is enabled -- if visibility is disabled, then the NXT will not respond to search commands from other BT devices. "ROBOTC2" is the friendly name for the NXT.
Bluetooth connect 1.2.gif
3. Then select "Search" command and run the command.
Bluetooth connect 2.gif
4. Once search has been performed, you'll be presented with a menu of the NXTs that were found via Bluetooth. In this case, only a single item -- the device "ROBOTC1" was found.
Bluetooth connect 4.gif
5. Select the target device for the connection from the search results -- i.e. "ROBOTC1" -- and then select "Connect"
Bluetooth connect 5.gif
6. The NXT supports connections to up to three "slave" devices. You need to select the appropriate "slot" (1, 2, or 3) for the connection. Select an empty slot -- all three slots are empty in the following picture -- and hit the orange button.
Bluetooth connect 6.gif
7. The NXT screen will show "Connecting" as the connection is attempted. Depending on the settings on your NXT, you may be prompted for a password.
Bluetooth connect 7.gif
8. Once the connection is made, the status ICON will change to "<>". The ">" indicates that the NXT is connected to another BT device.
Bluetooth connect 8.gif