Robotics - PowerPoint PPT Presentation

1 / 32
About This Presentation
Title:

Robotics

Description:

... then build bumper, experiment with mini-blocks, sound. Mindstorms terms ... Do this using the move mini block and using the motor mini block. Compare. Homework ... – PowerPoint PPT presentation

Number of Views:197
Avg rating:3.0/5.0
Slides: 33
Provided by: jeanin7
Category:
Tags: robotics

less

Transcript and Presenter's Notes

Title: Robotics


1
Robotics
  • Overview of NXT-G
  • Actuators in Mindstorms.
  • Touch sensor
  • Labwork CATCH-UP measurement, circle stool
  • Explore Move versus Motor
  • Move mini motor mini. Motor.
  • Add bumper and program move to (gentle) stop.
  • Homework Postings. Talk about nxtasy next class

2
Mechanics readings
  • What did you learn?

3
Catch-up lab
  • I'm missing timing for going around stool for
    many groups and measurements for some groups
  • Circle stool
  • What approach is best? How to define 'best'?
  • Quickest performance
  • Development time / ease of development
  • Robustness ?
  • Do this first, then build bumper, experiment with
    mini-blocks, sound.

4
Mindstorms terms
  • NXT-G refers to iconic language
  • NXT-G programs are compiled (translated) into
    what is termed byte code and downloaded to
  • NXT Brick, which holds
  • a 32-bit microprocessor (little computer)
  • 32 bit refers to size of data handled by
    microprocessor
  • memory for programs system routines sound
    startup/demo programs

5
Actuators
  • Multiple blocks for connecting to motors
  • Motor vs Move differ as to what the programmer
    does versus built-in controls
  • Motor, etc. used for other motors, sensors,
    etc., including hardware from older Lego products
  • Legacy
  • mini blocks later addition
  • Produces smaller code
  • Some reduction in function

6
Note
  • Up to you (robot builder) how the motor is
    attached
  • What port
  • And what the motor is attached to
  • Wheel
  • Grabber
  • ?
  • And direction

7
Move block
  • Set synchronized movement of 1 to 3 motors
    (usually 2)
  • Forward, backward, or specified degree of turning
  • Units can be
  • time (in seconds)
  • Rotations or degrees
  • Unlimited
  • Something else, a subsequent block, puts on the
    brakes
  • Set to brake or coast (if not unlimited)
  • Move will make sure to go exactly the rotations
    specified by control of motor.
  • Contrast with the motor blocks in which you the
    programmer specify ramping.

8
Defaults
  • Note for all blocks default settings
  • Which port for motors (default B and C)
  • Specific ports for each sensors
  • Default rotation versus others
  • Default power
  • Default brake versus coast
  • other

9
(No Transcript)
10
Move block data links can set values and/or
transmit values to subsequent blocks
  • Left motor (port)
  • Right motor (port)
  • Other motor (port)
  • Direction (forward/backward)
  • Steering
  • Power
  • Duration
  • Next action

11
Move mini block
  • Must use exactly 2 motors
  • Otherwise, reportedly produces smaller programs
    on the NXT brick.
  • NOTE reports that using different blocks
    produces larger code
  • Souse just move mini, not move mini, move and
    motor, if possible
  • Worry about this only if you need to

12
Motor block
  • Specify movement of one motor
  • Power
  • Duration
  • Action constant or ramp up to set speed or ramp
    down to stop
  • Specify wait for completion or go on to next
    block
  • Brake or coast

13
Changed settings
14
Motor mini block
  • Appears to be identical functionality
  • Claimed to produce smaller code

15
Wait blocks
Wait for something to happen In programming
language event driven or event based
programming NXT-G program will wait for the
indicated condition.
16
Default assumption is port 1. You can change this.
17
Basic bumper exercise
  • Use directions to build a bumper a flexible
    piece that when it hits something, the touch
    sensor is pressed
  • coupled

18
(No Transcript)
19
(No Transcript)
20
(No Transcript)
21
(No Transcript)
22
(No Transcript)
23
(No Transcript)
24
(No Transcript)
25
(No Transcript)
26
Program move until bumper hits
  • Move block (forward, unlimited)
  • Wait until touch block (press)
  • Move block (stop)

27
(No Transcript)
28
(No Transcript)
29
(No Transcript)
30
Exercises
  • Replace move blocks with move mini blocks.
    Download new program (different name)
  • With the robot connected, check size of the two
    programs.

31
Exercises
  • Using base robot (two wheels), write program
    moving just one motor a set number of rotations
  • this will cause the robot to turn.
  • Experiment to make robot turn to the left. This
    will not be a sharp turn, but an arc to the left.
  • NOTE this isnt degrees 90!
  • Do this using the move mini block and using the
    motor mini block
  • Compare.

32
Homework
  • complete exercises
  • Invent small application involving touch
    sensor, perhaps multiple uses, moving forward,
    backward, turning, stopping, etc.
  • Postings
Write a Comment
User Comments (0)
About PowerShow.com