Introduction to robotics part 1 (Lego NXT

1,125 views
1,065 views

Published on

Published in: Education, Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,125
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
37
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Introduction to robotics part 1 (Lego NXT

  1. 1. Introduction to robotics By Mr Hamilton
  2. 2. What is a robot? <ul><li>A robot is an electronically controlled machine that is able act autonomously </li></ul><ul><li>Robots are found in many areas of our lives including industrial, medical, entertainment and the home </li></ul>Sense Process Actuate Feedback
  3. 3. Hardware <ul><li>Sensors </li></ul><ul><li>Touch </li></ul><ul><li>Ultrasonic </li></ul><ul><li>Sound </li></ul><ul><li>Light </li></ul><ul><li>Actuators </li></ul><ul><li>Motor </li></ul><ul><li>Display </li></ul><ul><li>Lamp </li></ul><ul><li>Speaker </li></ul>Power source + Control unit + Mechanical parts
  4. 4. Software <ul><li>Software is a series of instructions and data that are compiled to machine code and executed in a CPU </li></ul><ul><li>Software is created on a computer in a high level language such as C++ or Visual Basic, or created in graphical environments such as SCRATCH or Lego NXT-G </li></ul><ul><li>This is the same for computer software and robotics software </li></ul>
  5. 5. Lego NXT-G basics <ul><li>Commands are dragged from the palette to the programming area </li></ul><ul><li>Commands will often have properties associate with them i.e. which way to drive a motor </li></ul><ul><li>There are essentially three types of commands sense, actuate and programme control </li></ul>
  6. 6. Lego NXT-G basics <ul><li>Once a programme has been written we must compile and download this to the robot </li></ul><ul><li>A file with the instructions & data will be stored on the robot </li></ul><ul><li>The Lego NXT can store multiple programs in a simple file system that can be run as required </li></ul>
  7. 7. Task 1 - Sequences <ul><li>Create a simple program that displays a word on the screen </li></ul><ul><li>Then plays a sound </li></ul><ul><li>Compile and download this and test it works as expected </li></ul>
  8. 8. Task 2 - Using motors <ul><li>Motors are a common form of actuator </li></ul><ul><li>In robots generally servo motors are used these allow precise control, part turns, time based etc </li></ul><ul><li>Create a series of commands that will make the robot move in a square, each side being 1 wheel circumference long </li></ul>
  9. 9. Task 3 - Using sensors <ul><li>Set the motors to drive the robot forward </li></ul><ul><li>Add a wait sensor block to detect and action i.e. button press, light above a level etc </li></ul><ul><li>Once detected robot should retreat for 1 second </li></ul>
  10. 10. Task 4- Making decisions <ul><li>Create a program that will decide to carry out 1 of 2 options </li></ul><ul><li>Depending on the sensor used if a value is above one threshold perform an operation i.e. make a sound otherwise perform another (i.e. move backwards) </li></ul>
  11. 11. Task 5 - Loops <ul><li>Repeat task 2 (move in a square shape) however complete this more efficiently using loops </li></ul>

×