Getting started with NXT /
NXC
|
|
Topics: |
Last updated:
27-08-11 |
|
In order to connect a NXT brick to a
USB-connection at your computer must you install a
Fantom driver:
FOLLOW LINK HERE
|
|
| The Bricx Command Center can be
downloaded from
HERE |
|
|
| In order to take full advantage
of NXC will a "new" NXT need an update for the
Firmware - take a talk with the instructor |
|
| You can find lots of online in
the BricxCC and at the net about NXC - Click figure
below. |
|
|
|
|
|
The Help menu will provide a lot
of useful information.
How to get help:
Place the cursor at
a word in the text
Press F1
|
|
|
In order to build a "robot" must
you be creative (or find a Build-Instruction)
First will you learn how the connect sensors and motors to the NXT
brick and learn how to write software NXC, that uses the interfaces.
|
|
. |
|
Getting started with BricxCC and NXC |
|
|
|
Get
the NXT Screen at your PC-screen |
|
|
|
The
first NXC program
|
A
program (C/NXC) will be formed of
variabels - like Count1 - which of
specific type like int. |
|
It
must have one function (a NXC task)
called main. (Read more about tasks
later) |
|
The
main function will often contain a
"for ever loop" -
while (true) { ........} |
|
The
function printYX( string, int, int)
a self-writen function. |
|
Many
functions predefined in the system -
ready to call - like SetSensor( )
and ClearScreen( ) - refer to the
online help for details. |
|
A
program formed with
control-statements like while(
condition) and if ( condition) |
|
The
output of the program depends of
input (from a touch sensor) and the
functionality of the program.
. |
|
|
|
|
|
|
|
|
|
|
|
Place the cursor over
printf and press [F1] |
|
|
|
|
|
|
|
|
|
|
|
|