You are on page 1of 7

Course Home - Course Project

Print This Page

Drawing an Etch-a-Sketch on the OLED


Objectives | Guidelines | Front Panel | Block Diagram | User Manual | Deliverables | Grading Rubrics | Best Practices Objective Use LabVIEW Embedded and the LuminaryMicro LM3S8962 Evaluation Board to create an etch-a-sketch program that displays on the evaluation board's OLED. Guidelines

Create a folder with the following path C:\ECT109\Week7\FinalProject. Create an ARM project VI that uses an EK-LM3S8962 ARM and save in the folder. Build an ARM application using LabVIEW and the LuminaryMicro LM3S8962 ARM board. Utilize the display and the elemental I/O VIs for the SK-LMS38962 in the project. The VI MUST contain elements learned from Weeks 1-7. Build the VI into an application, and run it on the ARM target and display the result on the OLED. Write a user manual (report) on how to use the etch-a-sketch program.
Front Panel The front panel contains:

1. An indicator that shows the direction being drawn (Right, Up, etc.). 2. Two numerical indicators showing the current X and Y position being drawn (referenced to
position 0, 0).

3. Four round LEDs used to visually indicate the direction being drawn. 4. An LED marked CLR used to indicate pressing the button clearing the OLED.
The figure below shows a typical arrangement.

Block Diagram The block diagram utilizes elemental I/O functions to control the direction drawn.

RightButton0 -- Draws a horizontal line to the right when pressed. The right front panel LED
illuminates. illuminates.

LeftButton0 Draws a horizontal line to the left when pressed. The left front panel LED UpButton0 Draws a vertical line up when pressed. The up front panel LED illuminates. DownButton0 Draws a vertical line down when pressed. The down front panel LED illuminates. Diagonal lines can be drawn by combining two of the buttons. For example, to draw a diagonal
line right and up, the RightButton0 and the UpButton0 are pressed at the same time. In a similar fashion, the LeftButton0 and the DownButton0 are used together to draw a line going left and down. Diagonal lines in all four directions can be created using the approach. The associated front panel LEDs will illuminate.

SelectButton0 Clears the OLED. The CLR front panel LED illuminates.
The VI should be created modally. The steps below are suggestions on how to build the VI. Use these steps as a guideline and add all details to complete the objective. Step 1: Create a While loop structure containing a Case structure.

Step 2: Use the elemental I/O functions to control the direction drawn. For example, use the RightButton0 to draw a horizontal line to the right. In a similar manner, assign weights and use the other elemental I/O function to draw horizontal, vertical, and diagonal lines.

Step 3: A compound arithmetic function is used to determine which case to select in the case structure. For example, if no switch is pressed, the output of the compound arithmetic function is zero and Case 0 is selected. If the RightButton0 is pressed, the output of the compound arithmetic function is one and Case 1 is selected, etc. "Direction" is a enum constant used to associate the value (0-16) with the name of the direction being drawn (Right, Left, Up, etc) and displayed on the front panel. The enum constant, Direction, is found on the Programming>>Numeric sub palette. It is used to associate numbers representing directions (1, 2, 4...) with the names of the directions (Right, Left, Up....). Change it to a numerical indicator and then, in properties, set each value used in the VI to its assigned display name. All values must be listed and no two names can be the same. The figure below show a partial enum constant configuration.

Step 4: A case structure containing conditions for each of the drawing directions as well as the clear function is needed. If no switch is pressed, Case 0 is selected and no changes are needed. However, if RightButton0 is pressed the drawing needs to be incremented horizontally by one pixel. Remember that the OLD has horizontal and vertical limitations and the VI must check for these limits.

Step 5: Once the VI has processed the input information and the correct case selected, the OLED display is updated.

User Manual (Report) Provide a user manual (report) for your program that is concise and allows a reader to properly operate the etch-a-sketch. The report organization is shown below: Cover Page:

Report Title Your Name Professor's Name Date


Introduction:

The introduction contains a thesis statement describing what the report is discussing. In other words, it should tell what is covered in the paper. The introduction is one paragraph and three to five sentences long. Body:

General Concepts Front panel display indications Button operation Clear function operation
Conclusion: The conclusion summarizes the information covered in the body of the report. The conclusion is one paragraph and contains three to five sentences. Format:

Font: Arial Size: 11 point Spacing: 1.15 Length: Maximum of three pages
Deliverables

1. Create a folder and name it FiLastNameFinalProject. 2. Copy the following files into the folder. o
From the project folder, copy the LabVIEW files with the extensions

A. .aliases B. .lvlps C. .lvproj D. .vi o


The report

2. Zip the folder. 3. Upload the zipped folder to the Dropbox


Grading Rubrics Category User Documentation Etch-a-Sketch Program Total Poin ts 20 80 100 % 20 % 80 % 100 % Description Provide a user manual for your program that is concise and allows a reader to properly operate your program. A complete working ARM program. A quality project will meet or exceed all of the above requirements.

Best Practices The following are best practices in preparing this project.

User Documentation: Review a user guide that is supplied with any purchased electronic
product. This should be a great starting point.

Functionality: Think about an Etch-a-Sketch and how it is used. You can use different variations
on how images are drawn (i.e., buttons like up, down, left, and right).

Make a backup: Always create a backup copy of the program. Build the VI in pieces: Do not attempt to draw the entire VI. Create the VI in small segments. Verify as you go: If possible, download and test each segment and correct any issues. Take notes: As you create the project, make notes about each step. This information can be used
in the user manual.

You might also like