Presentation is loading. Please wait.

Presentation is loading. Please wait.

Robotics Overview of NXT-G Actuators in Mindstorms. Touch sensor Labwork: Right turn. Touch/bump. [Explore move versus Motor Move mini & motor mini. Motor*.]

Similar presentations


Presentation on theme: "Robotics Overview of NXT-G Actuators in Mindstorms. Touch sensor Labwork: Right turn. Touch/bump. [Explore move versus Motor Move mini & motor mini. Motor*.]"— Presentation transcript:

1 Robotics Overview of NXT-G Actuators in Mindstorms. Touch sensor Labwork: Right turn. Touch/bump. [Explore move versus Motor Move mini & motor mini. Motor*.] Add bumper and program move to (gentle) stop. Homework: Postings.

2 Mechanics readings What did you learn?

3 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

4 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

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

6 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….

7 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

8

9 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

10 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 –So…use just move mini, not move mini, move and motor, if possible –Worry about this only if you need to…

11 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

12 Changed settings

13 Motor mini block Appears to be identical functionality Claimed to produce smaller code

14 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.

15 Default assumption is port 1. You can change this.

16 Basic bumper exercise Use directions to build a bumper: a flexible piece that when it hits something, the touch sensor is pressed –coupled

17

18

19

20

21

22

23

24

25 Program: move until bumper hits Move block (forward, unlimited) Wait until touch block (press) Move block (stop)

26

27

28

29 Lab Change name Program right angle move/spin (left and right)

30 Lab Add bumper sensor –Move until bump, back up, turn slightly, move again… Need to look up Loop block –Loop fixed number of times OR –Loop forever

31 [Exercises] Replace move blocks with move mini blocks. Download new program (different name) With the robot connected, check size of the two programs.

32 Classwork/Homework Invent application involving bump/touch sensor Postings


Download ppt "Robotics Overview of NXT-G Actuators in Mindstorms. Touch sensor Labwork: Right turn. Touch/bump. [Explore move versus Motor Move mini & motor mini. Motor*.]"

Similar presentations


Ads by Google