lego mindstorms robotic invention system
Download
Skip this Video
Download Presentation
LEGO Mindstorms Robotic Invention System

Loading in 2 Seconds...

play fullscreen
1 / 37

LEGO Mindstorms Robotic Invention System - PowerPoint PPT Presentation


  • 562 Views
  • Uploaded on

LEGO Mindstorms Robotic Invention System. Barb Ericson [email protected] Georgia Institute of Technology. What is it?. A kit for creating and programming robots built with LEGOs. What is in it?. 717 LEGO elements One RCX programmable brick 2 motors 2 push sensors 1 light sensor

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'LEGO Mindstorms Robotic Invention System' - justus


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
lego mindstorms robotic invention system

LEGO Mindstorms Robotic Invention System

Barb Ericson

[email protected]

Georgia Institute of Technology

what is it
What is it?
  • A kit for creating and programming robots built with LEGOs
what is in it
What is in it?
  • 717 LEGO elements
    • One RCX programmable brick
    • 2 motors
    • 2 push sensors
    • 1 light sensor
    • Infrared transmitter for transferring the programs
  • A Constructopedia book with plans for 3 robots and many variations on them
  • CD with video on getting started and visual programming environment (RCX code)
    • 9 robots total
what else do you need
What else do you need?
  • 6 AA batteries
  • Computer
    • Windows 98/Me/XP
    • Pentium II 233MHz
    • 32 MB RAM
    • 115 MB Disk Space
    • USB Port (for the infrared transmitter)
what else might you want
What else might you want?
  • Plastic storage containers
    • For storing built robots
    • And for sorting parts better
  • Ultimate Accessory Kit - $50
    • 45 LEGO pieces including
      • 1 remote control
      • 1 touch sensor
      • 1 rotation sensor
      • 1 lamp
      • 1 Constructopedia
more sensors
More Sensors
  • http://www.legoeducationstore.com/catalog.cfm?dest=itempg&itemid=920&secid=9&linkon=subsection&linkid=45

Light

Angle (Rotation)

Touch

Temp

Touch

dcp sensors
DCP Sensors
  • http://www.legoeducationstore.com/catalog.cfm?dest=itempg&itemid=922&secid=9&linkon=subsection&linkid=45
what else might you want8
What else might you want?
  • Vision Command - $100
    • A video camera
      • 30 frames per second
      • 352 by 288 color
      • 145 LEGO elements
      • USB connection
      • Built-in microphone
      • Vision recognition software
  • Or get just the camera and USB cable for $39.00 at LEGO Education Store
what does it cost
What does it cost?
  • About $200
  • Buy at
    • Toys R Us
    • Shop.lego.com
    • Amazon.com
    • Wallmart.com
    • http://legomindstorms2.0.hobbytron.net/robotlegosub.html?source=1359
    • Ebay.com
what can you do with it
What can you do with it?
  • Use it with RCX code or Robolab (visual programming)
    • To teach about commands, programs, iteration, conditionals, and variables
    • Without worrying about syntax
  • Use it with leJOS (Java)
    • To teach about commands, programs, iteration, conditionals, and variables
    • Arrays, strings, recursion, listeners, static
    • Using Java syntax
programming your robot
Programming your Robot
  • Click the Program button in the main menu
pick the robot
Pick the Robot
  • Pick the robot to program. If you are using your own design pick “Freestyle”.
create a program using rcx code
Create a Program using RCX code
  • Big Blocks are shown for a particular robot
  • Click and drag them to make a program
    • They will snap into place
  • You can save the program using the File menu
    • This will name your program
download your program
Download your Program
  • Turn on the RCX (OnOff button)
  • Plug the IR Tower into your computer
  • Put the RCX near the IR Tower
  • Click the “Download” button
    • The default is to download to slot 5
    • You can change this by clicking on “Settings”
  • When the download is finished the RCX will play a short tune
    • It displays dots during the download
running the program
Running the Program
  • Two ways to run
    • Click the Run button on the RCX
    • Or click the Run button on the screen
  • Stopping the program
    • Click the Run button again on the RCX
    • Or click the Stop button on the screen
modify a block
Modify a Block
  • Click on the edit tab at the right edge of the block
  • You can change the duration of commands
    • Use the arrow key to use preset values
    • Or type a value in the textbox
robot challenge
Robot Challenge
  • Make your robot go forward for 2 seconds
  • Make your robot turn right for 1.5 seconds
  • Make your robot go backwards for 3 seconds
  • Make your robot spin left for 1.5 seconds
  • Save your program using the File menu
getting more information
Getting More Information
  • Click on Help
  • Click on What’s this?
  • The cursor will show What’s this? with an arrow
  • Click on something you want more information about
    • Like a block
    • Or a menu item
robot challenge19
Robot Challenge
  • Use the help to find out the difference between turn left and spin left
  • Use the help to figure out what a Dance block will do
  • Use the edit tab to try out the Dance block
    • Make sure your robot is on and near the IR tower
using the sensors
Using the Sensors
  • Click a Touch Sensor on the left and position it on the right
    • Pick the input port attached to your sensor
    • Click next
  • Pick when to respond
    • On press, release, or click (press and release)
    • Click next
  • Click “Try It” to try it or “Done”
handling a sensor event
Handling a Sensor Event
  • Add command blocks after the if sensor event block
    • These actions will happen when that sensor event happens
    • Like when the touch sensor is pressed
    • Or when the light sensor’s value is > or < some amount
robot challenge22
Robot Challenge
  • Make your robot go forward for 10 seconds
  • If your robot’s touch sensor is pressed backup for 1 second and spin right
  • Set up items to block your robot and try it
adding iteration
Adding Iteration
  • Use Repeat Blocks to add iteration (looping)
  • You can change the number of iterations
  • You can repeat a group of commands
conditionals
Conditionals
  • Add a test
    • Do one thing if the test is true
      • Like turn left
    • Do something else if the test is false
      • Like turn right
variables
Variables
  • You can create new variables
    • freq
  • And use them in other blocks
    • Add to them
    • Subtract from them
    • Multiply them
    • Divide them
create new blocks
Create New Blocks
  • You can create new blocks using My Blocks
    • Name the block
    • Add other blocks to it
    • You can collapse the interior commands
      • Click on upper left square
small blocks
Small Blocks
  • Finer control of robot
  • Big Blocks are made up of small block commands
  • Click on the top left box to open a big block
    • And see the internal small blocks
where to get help
Where to get help?
  • http://mindstorms.lego.com\
    • Main web site
  • Books – at LEGO Education Store
    • Building Robots with LEGO Mindstorms
    • Creative Projects with LEGO Mindstorms
    • LEGO Mindstorms: RIS 2 Projects
project ideas
Project Ideas
  • Anders Project ideas (scanner, fan)
    • http://www.norgesgade14.dk/legoSider/mindstorm_en.html
  • Andy’s Page (chess playing robot)
    • http://www.artilect.co.uk/lego/default.asp?page=Chess
  • Buick Music Study (Play MIDI or WAV files)
    • http://www.aga.it/%7Eguy/lego/bms.html
  • Joe’s Nagata’s Mindstorms Gallery (vehicles)
    • http://homepage3.nifty.com/mindstorms/
    • http://members.at.infoseek.co.jp/Milano/studio1.html (movies)
  • Mario Ferrari’s Web Pages (piano player, skier, etc)
    • http://www.marioferrari.org/lego_mindstorm.html
using java with lego robots
Using Java with LEGO Robots
  • Install leJOS (the Java Operating System)
    • Download from http://lejos.sourceforge.net/faq.html
  • Set the system variables
  • Plug in the IR Tower to the top USB port
  • Download the firmware using a command prompt
    • lejosfirmdl
setting system variables
Setting System Variables
  • Create new System Variables
    • LEJOS_HOME variable to the directory where leJOS is installed
    • RCXTTY=USB
  • Add to the PATH variable
    • The Java SDK bin directory
    • ;%LEJOS_HOME%\bin
  • Add to the CLASSPATH variable
    • ;%LEJOS_HOME%/lib/classes.jar;%LEJOS_HOME%/lib/pcrcxcomm.jar
using lejos
Using leJOS
  • Import the classes in leJOS
    • import josx.platform.rcx.*;
  • Compile for Java 1.1 using
    • lejosjc.bat Class.java
  • Link together an executable
    • lejoslink.bat -o Class.bin Class
  • Download the executable to the RCX
    • lejosdl.bat Class.bin
motor class
Motor Class
  • 3 objects are available as public static (class) variables
    • Motor.A, Motor.B, and Motor.C
  • You make the motor go forward, backward, stop (brake), and float to a stop
  • When you start a motor forward it will keep going until you tell it to stop or float to a stop.
  • Use Thread.sleep(numMilliseconds) to control how long the motor is moving
  • Control how fast the motor moves with
    • setPower(num) with num from 0 to 7 (fastest)
motor test
Motor Test
  • Make both A and C motors go forward at power 7 for 1 second
  • Stop for 1 second
  • Have both motors go forward at power 2 for 3 seconds
  • Float to a stop
lejos resources
leJOS Resources
  • Download from
    • http://lejos.sourceforge.net/
  • Tutorial at
    • http://lejos.sourceforge.net/tutorial/
  • Discussion at
    • http://sourceforge.net/mailarchive/forum.php?forum_id=552
  • Books
    • http://lejos.sourceforge.net/books.html
first lego league
FIRST LEGO League
  • Robotics competition for a team of kids (ages 9-14)
    • Up to 10 kids on a team
      • Register by Sept 30th
    • Work for 8 weeks on a challenge
      • New one each year
    • Compete at tournaments Nov – Dec
      • Georgia Tech hosted one Jan 15, 2005
    • Cost (about $600 per team)
ad