NXTender: Extend Your NXT
Built-In Plugins

By Sivan Toledo
September 2006

The command format of all the built-in plugins uses space to separate arguments.

In the documentation below, <word> stands for a single word of text (without spaces, but it can have hyphens and other punctuation), <number> for an integer, and <boolean> for the words true or false.

Beep

Sends a beep to the PC's speaker. Useful for testing. A single command:

Keyboard

Controlling the keyboard of the PC using A single command format:

The argument is a name of a key, such as LEFT or RIGHT or TAB, in uppercase. There are many possible key names, which are really the names of virtual keys under Windows. See sivantoledo.nxt.keyboard.Keyboard.java for a full list (until we have a list here). 

This command causes the named key to be "pressed" on the PC, as if somebody actually clicked on the keyboard. The application in the foreground will receive the key event (that is, the key event is not delived to NXTender, but usually to some other application running on the PC).

Here is a demo program that sends left- and right-arrow commands, to control presentations.

Mouse

Simulating mouse movements and clicks on the PC.

Joystick

This plugin allows the NXT to receive events from a joystick connected to the PC.

(This plugin is incomplete; it works, but I may still change it).

The demo program shows how to control a vehicle using this plugin. The program works with JenToo, or other robots in which the motors are used upside down, so that backward in the move block really means forward.

Radar-Style Display

The plugin allows the NXT to open a radar-style window on the PC and to draw dots on it.

The demo program performs a single scan. It works when the ultrasonic sensor is connected to port 4 adn the motor that controls it to port A, and when 5 rotations of the motor translate via gear reduction to a single rotation of the sensor. For other ratios, adjust the divisor in the divide block.

Ping

This plugin is designed for testing and performance measurements.

© 2006, Sivan Toledo