Presentation is loading. Please wait.

Presentation is loading. Please wait.

NXT Mindstorms Kit Programming

Similar presentations


Presentation on theme: "NXT Mindstorms Kit Programming"— Presentation transcript:

1 NXT Mindstorms Kit Programming
LabVIEW Lecture-3 NXT Mindstorms Kit Programming MEH108 - Intro. To Engineering Applications KOU Electronics and Communications Engineering

2 LEGO© Mindstorms Educational Kit

3 The Mindstorm NXT Kit educational
In the two boxes you have: Hundreds Hardware pieces 5 Different sensors 3 motors Programmable brick to control motors and sensors Programming: Mindstorm NXT toolkit

4 The NXT is the brain of a MINDSTORMS® robot
The NXT is the brain of a MINDSTORMS® robot. It’s an intelligent, computer-controlled LEGO® brick that lets a MINDSTORMS robot come alive and perform different operations.

5 NXT: the brain 360 deg. unwrapped image 32-bit ARM7 microcontroller
256 Kbytes FLASH, 64 Kbytes RAM Bluetooth 4 input ports, 6-wire cable digital platform 3 output ports, 6-wire cable digital platform 100 x 64 pixel LCD graphical display Loudspeaker - 8 kHz sound quality. Power source: 6 AA rechargeable batteries 360 deg. unwrapped image

6 Touch sensor The Touch Sensor gives your robot a sense of touch.
The Touch Sensor detects when it is being pressed by something and when it is released again. You can use the touch Sensor to make your robot pick up things: a robotic arm equipped with a Touch Sensor lets the robot know whether or not there is something in its arm to grab. You can use a Touch Sensor to make your robot act on a command.

7 Sound sensor The Sound Sensor makes your robot hear!
The Sound Sensor can detect both decibels [dB] and adjusted decibel [dBA]. A decibel is a measurement of sound pressure. The sensitivity of the sensor is adapted to the sensitivity of the human ear. In other words, these are the sounds that your ears are able to hear. Also, the sensor can detect some sounds that are too high or too low for the human ear to hear.

8 Light sensor The Light Sensor is one of the two sensors that give your robot vision The Light Sensor enables your robot to distinguish between light and dark. It can read the light intensity in a room and measure the light intensity of colored surfaces. You can make a burglar alarm robot: when an intruder turns on the light in your room the robot can react to defend your property. You can make a line-following robot or a robot that can sort things by color.

9 Ultrasonic sensor The Ultrasonic Sensor enables your robot to see and detect objects. You can use it to make your robot avoid obstacles, sense and measure distance, and detect movement. The Ultrasonic Sensor measures distance in centimeters and in inches. It is able to measure distances from 0 to 255 centimeters with a precision of +/- 3 cm. The Ultrasonic Sensor uses the same scientific principle as bats: it measures distance by calculating the time it takes for a sound wave to hit an object and return – just like an echo.

10 Ultrasonic sensor

11 Servo Motors The three Servo Motors give your robot the ability to move. The two motors will automatically synchronize, so that your robot will move in a straight line. Each motor has a built-in Rotation Sensor. The Rotation Sensor measures motor rotations in degrees or full rotations [accuracy of +/- one degree]. The built-in Rotation Sensor in each motor also lets you set different speeds for your motors

12 Different Movements Point Turn Swing Turn Gradual Turn

13 NXT Toolkit for LabVIEW 2013

14 Connecting the NXT kit Requirements: LabVIEW 2013,
NXT Toolkit for LabVIEW 2013, USB cable, NXT Mindstorms Kit

15 Connecting the NXT kit

16 Direct Mode ? or Remote Mode?
In Direct Mode: You must run the program from the computer to the NXT kit using USB or Bluetooth so communication is required while running. Advantage: You can receive information from NXT or send information to NXT. In Remote Mode, You can run the program directly from NXT kit without any communication from the computer. Advantage: Use NXT kit as a robot.

17 Direct Mode Remote Mode
Change to Remote Mode Change to Direct Mode

18 Direct Mode Remote Mode
In remote mode: * Only NXT functions can be used !

19 NXT Functions NXT Programming: Basic programming used in all programming NXT I/O: Sensors, motors, sound, display, data logging Behaviour: Pre-made code for controlling robot

20 Example 1: Hello World (Display)
* To add a new program «File >> New NXT >> Targeted VI» * NXT I/O >> Complete >> Select «Display» * To get more information: Right click >> View as icon Change to Remote Mode / Direct Mode

21 Example 2: Collect and Display Sensor Data
Read Ultrasonic Sensor and plot the measured value on PC. Connect and configure the sensor port ! Port 1? 2 ? 3 ? 4 ? * Read sensor continuosly, * Plot the measured value, Use Direct Mode !

22 Example 2: Collect and Display Sensor Data
Sensor functions: (I/O >> Complete >> Sensors) Read Touch (Release, Bumped, Pressed, Count), Read Light (LED on, LED off), Read Sound (dB, dBA), Read Ultrasonic (cm, inch, Listen), Read/Reset Rotation Angle, Read NXT Brick Button, Read/Reset Timer

23 Example 3: Using Loud Speaker
Sensor functions: (I/O >> Complete >> Sounds) Tone, Tone no wait, Stop sound, Is playing ? Play note (A,B,C,D,E,F,G), Play sound file

24 Example 4: Move robot for 5 seconds
Sensor functions: (I/O >> Complete >> LEGO Motors) Motor on, Motor reverse, Motor brake (Stop suddenly), Motor coast, Steering on (?) Move robot for 5 seconds Connect and configure output ports ! Port A ? B ? C ?

25 Using Timing/Waits Functions
Sensor functions: (I/O >> Complete >> Waits) Wait for Time (miliseconds, seconds) Wait for Darkness/Brightness/Brightness Change, Wait for Closer/Further, Wait for Pressed ( Wait until button is pressed) Wait (Button)


Download ppt "NXT Mindstorms Kit Programming"

Similar presentations


Ads by Google