This post shows a simple example of programming the Lego Mindstorm using NXT-G graphical language. The simple example demonstrates a program that allows motor C to be controlled. This comes in handy when testing a robot and you want to try different speeds and directions with a motor. Kinda like a little utility program.
The program starts motor C at 40% power in the forward direction. The running speed is also displayed on the LCD. Pressing the orange button starts / stops the motor.
At anytime the left / right buttons can be used to set the new power level. The cursors can be used to set the power anywhere from -100% to +100% in steps of 5%. Holding a cursor key down scrolls the power set-point which is displayed on the LCD. Once the desired power level is chosen, toggle the motor on / off to use the new set-point.








