160 likes | 271 Views
This lecture by Dr. Kathryn Merrick provides a comprehensive overview of graphical programming languages, focusing on Lego Mindstorms NXT. Key topics include variables, types, values, operators, flow of control, and built-in functions. Participants will learn about the NXT programmable brick and the programming environment, including how to use 'Move' functions, loops, and conditions as if they were Lego bricks. Through two complete programming demos of a Lego scorpion, attendees will gain insights into using MATLAB tools in the NXT graphical language and understand the strengths and limitations of graphical programming.
E N D
Graphical Programming Languages Lecture 19: Supporting Material Dr Kathryn Merrick Thursday 21st May, 2009
Overview • Graphical programming languages: • Variables, types, values, operators • Flow of control • Built-in functions • Strengths and limitations
Lego Mindstorms NXT: Programmable Robots Programmable Brick
The NXT Programming Environment The programming window
Built-in Functions ‘Move’ functions connected up like Lego bricks Input parameters set here
Loops Instructions to be repeated will be dragged into here Loop connected up like a Lego brick Exit condition (can behave like a for loop or a while loop)
Selection What to do will be dragged into here Selection connected up like a Lego brick Conditions set here
Demo 1: Programming a Lego scorpion
Variables Variable brick
Maths Operators Maths operator brick
Boolean Operators Boolean operator brick
Demo 2: Programming a Lego scorpion
Summary • After today’s lecture you should be able to: • Identify the key programming tools we used in MATLAB in the NXT graphical language • Appreciate the strengths and weaknesses of graphical languages