titan-security domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home1/kennydai/public_html/vesnam/NXTrobot/wp-includes/functions.php on line 6131Knowing that NXT\u2122 will represent the brain<\/em> of any robot we make, as well as that this brain<\/em> does not come with embedded intelligence or ability to learn, each robot we make will be as smart<\/em> as we program it to be. Programming in the machine language probably wouldn’t take us too far. Luckily, there are easier ways to program NXT\u2122. This does not mean that suddenly NXT\u2122 can understand something else than 1s and 0s; it means that there exist other computer programs (compilers and interpreters) that can translate programming languages that are more intuitive for humans into the machine language. There are quite a few programming languages (and compilers) that can be used for NXT\u2122 programming (here<\/a> is a nice summary) and\u00a0NXT comes with a LEGO\u00ae provided bytecode interpreter.<\/p>\n Here, I will focus on one of the high-level\u00a0NXT\u2122programming languages, called NXC (Not eXactly C). The NXC is very similar to a standard C programming language, with some limitations that reflect different capabilities of\u00a0NXT\u2122 OS. The most important part of the NXC is the NXC Application Programming Interface (API) that describes the system functions, constants, and macros that can be used by programs (this is what we’ll use to work with sensors, motors, and outputs). To write a NXC program, you don’t need any fancy editor, a simple text editor is enough.<\/p>\n To compile NXC programs\u00a0 we will use the NBC compiler (available for multiple platforms and can run under both 32-bit and 64-bit OS.). This compiler translates text-based source NXC programs into\u00a0NXT\u2122 bytecodes; these bytecodes are then executed on NXT\u2122 with the help of the NXT\u2122 LEGO\u00ae\u00a0 bytecode interpreter. A nice feature of NBC compiler is that it automatically includes NXC APIs\u00a0when compiling a program. The NBC compiler installation is very simple:<\/p>\n To find more up-to-date information and documentation for NXC, check http:\/\/bricxcc.sourceforge.net\/nxc\/<\/a>.<\/p>\n <\/p>\n","protected":false},"excerpt":{"rendered":" The\u00a0NXT\u2122 brick is a micro-computer. As any other computer, it needs an operating system (OS) to communicate with the hardware and to allow programs to run. Different OSs are developed and optimized for different types of computers. The NXT\u2122 micro-computer … Continue reading
<\/a>The\u00a0NXT\u2122 brick is a micro-computer. As any other computer, it needs an operating system (OS) to communicate with the hardware and to allow programs to run. Different OSs are developed and optimized for different types of computers. The NXT\u2122 micro-computer runs the NXT\u2122 OS. Among other things, the NXT\u2122 OS provides a set of commands and functions that define how NXT\u2122 (i.e.<\/em>, the robot) communicates with motors, sensors, and the NXT\u2122 screen. It also defines the required structure and properties of programs that will be run on the NXT\u2122. As any other machine, at its lowest level NXT\u2122 requires all programs to be represented in the form of the machine language. All commands in the\u00a0machine language are represented as sequences of 1 and 0, e.g.<\/em>, 10101100101. As such they correspond to electrical signals: 1 – signal\/electricity on and 0 – signal\/electricity off, that can be directly interpreted by the computer. However, while easily understood by computers, machine language is not very intuitive for humans (because it consist entirely of 1s and 0s) and it is very inefficient (or almost impossible) for programmers to use it.<\/p>\n\n