Workshop for FLL Coaches
Developed by Tony Ayad
Updated by LeRoy Nelson
California - Los Angeles Region FLL
September 2012
Outline
• Purpose:
• This workshop is intended for FIRST® LEGO® League (FLL®) coaches who are interested in learning about LEGO® MINDSTORMS® NXT and the NXT-G programming language.
• Basic Programming Agenda (Introductory Workshop)
• NXT Controller (aka: the “brick”)
• Blocks
• The NXT-G Interface
• The MOVE, MOTOR & RESET Blocks
• Turns - there is more than one way to turn
• Geometry and Math for the Robot
• Resources
• Advanced Programming (for Advanced Workshop)
• Light Sensors
• Program Control (WAIT, LOOP, SWITCH Blocks)
• Math (VARIABLES, MATH and COMPARE Blocks)
• My Block
• Touch Sensors
08/31/12
Basic Programming - Tony Ayad
2
NXT Controller – The robot’s “brain” The USB port is used to connect to
The PC so you can download the aka: the “Brick”
Programs into NXT Controller
3 Output ports used for the motors
A
B
C USB
Name
Icons representing menu options
Use this button to turn on the NXT and select the shown option
SELECT menu option (right)
SELECT menu option (left)
Menu Level Back (off)
4 sensor Input ports used to attach sensors
08/31/12
Light Sensor
1
2
3
4
Basic Programming - Tony Ayad
Touch Sensor
3
FLL Robot Configuration
• For FLL Competition you are allowed:
• 1 NXT Brick [or the discontinued RCX yellow Brick]
• Up to 3 motors; two for moving; the third is for the arm
• Any number of LEGO-manufactured MINDSTORMS type sensors: touch, light, color, rotation or ultrasonic
[However, you only have 4 sensor ports on the NXT!]
• You can use as many non-electric LEGO pieces as you need
• You may NOT use ANYTHING that is not made by LEGO
• Instructing the robot to move and turn is accomplished by the
NXT Motors, which rotate in a predetermined direction.
• All examples used in this document assume the robot