Unit 03 Introduction to Labview and Lego Brick
Introduction to Labview Tutorial
1. Open Lego Mindstorm Education from your desktop
2. Startup screen known as the “Lobby” will look as follows
Menu Options: Shows
reference material,
build guides,
programming guides,
and more
3. Starting a new Project > Select File > New Project > New Program > Open
Double Click on Program Tab > Change the
name to Hear Me
4. Option 1: Adjusting Project Properties Select the Wrench Icon next to the program name
Option 2: Double Click on File name Tab (Program). This will highlight the program name to be changed
The Project name will change once the file is saved.
5. Change the Project Name to Labview Tutorial
6. Click on the Hear Me Program Tab
7. Programming Area
Making Sounds 1. Select Action (Green Tab) > Drag the Sound Action onto the work area and attach it to the
Play button. The pieces fit together like puzzle pieces. Screen should look as follows
2. Choose a sound from the Lego Sound File
Stop: no sounds
Play File: Select a saved sound file
Play Tone: Plays a tone based on
certain frequency
Play Note: Set a note from a piano
Volume
Control
0: Wait for Completion
1: Play Once
2: Endless Loop
May choose a pre saved file for sound. Click on Lego
Sound files to see some of the options
3. Attach the Brick to your PC using the USB to Micro USB cord >Press the middle button on
the Brick to turn it on > The color around the Brick buttons will turn green when it is fully
loaded. The Labview software will tell you that your Brick is connected in the lower right
corner of the screen. You may rename your Brick your team name if you would like.
4. Press Play on your screen > the sounds will come out of the speaker on your Brick. Note the
Hear Me Program is not downloaded to the Brick. To place the program on your Brick click
on the download icon located on the Brick Connection Type Menu located in the lower right
hand side of the screen
5. Once downloaded looking at your Brick press the left arrow key to navigate to the File
Folder Icon located at the top of the screen> Press middle button on the Brick to select the
Icon > Go into the Project folder > Your file Hear Me should be located there used the toggle
arrows to go to it > Press middle button to activate the sound
6. Save Project as Intro to Brick
Adding a Start and End Button It is often times desired to add a start/stop button for a program. Notice after the
sound program was run the sound occurred immediately. By adding a start/stop button
the user can control when the program is initiated.
1. Add the following two Blocks from the Flow Control Menu > Drag Wait Command and place
in the locations below > Set the Command to Brick Buttons > Compare > Brick Buttons
Download
Download and
Run
2. Set the settings below
3. Download and run the program. Notice the program will not run until the middle
button is pressed and will not end until the left button is pressed
Set to Option 2: This is equal
to the middle button on the
brick
Set to Option 1: This is equal
to the left button on the brick.
Be sure that only Option 1 is
selected
May Select more than 1 option
selected at a time.
Displaying Images to the Brick Screen
1. On Labview screen Click the + sign next to the Hear Me tab > Rename the Tab See Me
2. Select Action Tab (Green) > Drag the Display action and place next to the Green Arrow. Be sure
the two objects link together
Display Options
3. Select a saved Image > Download Program to Brick and Play image
4. The image may only appear for a split second. To leave the image on the screen longer go to the
Flow Chart (Orange Tab) > Drag Wait icon next to the display icon. Set a time of 3 seconds >
re-download and run the program
Saved File Options
X,Y Coordinates
on the Brick
Screen Display Options
Option to Clear the screen
True: Clears the screen
False : Keeps image on screen
5. On the Image Block > Change the X and Y coordinated to X =20 and Y = 30. Re download the
program and see where the image is located
6. Save Project as Intro to Brick
Combining Sounds and Images
1. Click the + sign next to See Me > Rename it Combine 1
2. Drag the follow images to show as following. Select the file type for the sound and image as
well
3. Notice how the sound comes before the image
4. Setting up the sounds and image to happen at the same time. Create a new program next
to Combine 1 > Name it Combine 2 > In the Combine 2 program screen Set the following
icons and the file types
5. Connecting the different menus. On the Play button Hold Left Mouse Button (LMB) on the
Plug end of the Play Button. As you drag notice a wire appears > Connect the plug to the
sound icon > repeat the process to connect the Image menu.
6. Download the updated program and play
7. Save Project as Intro to Brick
Loops
1. Click the + sign next to See Me > Rename it Loops
2. Flow Chart (Orange Tab) > Loop > Drag next to Start Button
Allows User to set how long
the loop will run for
3. Select Brick Buttons
4. Go to Action (Green Tab) > Drag Display Action into the loop in front of the length > Set Display
to angry eyes.
5. Run the program
6. Save Project as Intro to Brick
7. Print Screenshots of your different programs. Place printouts in the Team Folder.
Assignment: Brick Sound and Display
Directions: Write a program that will do the following.
Program: Write a story that uses the following
- Minimum 3 sounds
- Minimum 3 images
- Minimum 1 loop
- Start Button
- Time for minimum of 5 seconds
Be sure to time out your project I.E Sounds with images. May use download or
created sounds and images. Make sure your sounds and images are school
appropriate. Print a screen shot of your finished program and place it in the Course
Folder.
Selection Buttons on the Lego
Brick. 2 represents the middle
button
Top Related