The SetLampColor function commands the NXT brick to set the color sensor lamp to one of the following:
The input parameter should be an NXT input port number between 1 and 4 (which the color sensor is plugged into).
nxt.SetLampColor( input, color );
function OnStart() { nxt = app.CreateNxt(); app.SetMenu( "Connect,SetLampColor" ); } function OnMenu( name ) { if( name=="Connect" ) nxt.ShowDevices(); else if( name=="SetLampColor" ) nxt.SetLampColor( 3, "Red" ); }