Upload
michael-singleton
View
212
Download
0
Embed Size (px)
Citation preview
Team 0
Ahmed Khawaja: Microcontroller Jonathan Limpalair: Construction Bryan Mason: Microcontroller Jesse Mccall: Editor, UI David Pesa: Construction Eric Stockton: Team Captain, UI
Our Team
Our goal was to make a reprogrammable Turing machine.
The physical machine is made entirely of Lego parts.
The Lego microcontroller is programmed in C like language.
The GUI is programmed in Java.
Description
The machine interfaces with the tape based on a program specified by an end-user.
The machine has an instruction set including jump, move, and write.
The machine uses a 32 bit reel of tape. The user interface displays output that
explains the binary on the tape.
Features
DemonstrationLet us show you…
Microcontroller
Bricx Command Center BricxCC used to program the controller for
the LEGO motors◦ No need for Arduino, we have a powerful tool at our
disposal already◦ Simpler and well-documented examples
nXc – Not eXactly C◦ More control over the machine
Access of encoders, byte-flag options for sensors◦ Tasks
“Threaded” programs◦ Functions
Normal C-like functions
Test Plan Overview Initially test components individually
◦ Hardware Move tape, flip bits, read bits Testing while building allows a quick modification of
hardware configuration to achieve desired results◦ GUI
Accept user input, modify existing input, export input Easier to determine which component
contributes to failure After both hit acceptable levels, start testing
combination of GUI and Hardware What our machine is designed to do
Physical Machine
We used the Mindstorms NXT 2.0 set (#8547).
We also ordered spare parts from both the Mindstorms NXT 2.0 set and crane set.
The Intelligent Brick, motors, and sensors from the Mindstorms NXT 2.0 set are all that operate the motor functions of the machine.
Parts
The physical machine consists of a base and the strip of tape.
The bit flipping arm, the motor that moves the tape, and the sensor are on the base.
The Tape is a 32 bit long connected piece that floats along the base and is driven by the motors.
Build
Graphical User Interface
GUI Overview
Testing
Color sensor used to read in the value of a bit (Zero or One position)
One of the more complex parts of the project
Values read in by the sensor are affected by the ambient light in the room
We use a calibration and voting algorithm to get accurate readings from the sensor.
Color Sensor
Sensor Test Code
Sensor Test Control Flow
The predicate: (buttonClicked || (ctrlKey && shiftKey && qKey));
This predicate acts as a contingency plan for the Turing machine. If preferred, the user can use keyboard commands to exit the program.
Complex Predicate
Evaluation Tree
Path # buttonClicked
ctrlKey shiftKey qKey True
1 T - - - Yes2 F F - - No3 F T T T Yes4 F T F - No5 F T T F No6 F T T T Yes
Modified Condition Coverage
Configurations
Parameter Value
Workstation Mac Dell Vostro
Personal Build
Dell Laptop
Screen Size 15" 18" 22"
GUI Size (In Dimension/Java)
30x50
50x50 60x40
Bit Flip Speed (Motor %)
30% 60% 100%
Tape Movement Speed (Motor %)
30% 60% 100%
Run No
WorkStation Screen Size
GUI BFS TMS Pass/Fail
1 Mac 15" 30x50 30% 30%2 Mac 18" 50x50 60% 60% F3 Mac 22" 60x40 100% 100% F4 Mac 15" 30x50 30% 30%5 Dell Vostro 15" 50x50 100% 30% F6 Dell Vostro 18" 30x50 30% 100%7 Dell Vostro 22" 30x50 30% 60%8 Dell Vostro 15" 60x40 60% 30% F9 Personal Build 15" 60x40 30% 60% F
10 Personal Build 18" 30x50 100% 30%11 Personal Build 22" 30x50 60% 30%12 Personal Build 15" 50x50 30% 100% F13 Dell Laptop 15" 30x50 60% 100%14 Dell Laptop 18" 60x40 30% 30% F15 Dell Laptop 22" 50x50 30% 30% F16 Dell Laptop 15" 30x50 100% 60%
Orthogonal Array
Entry Test (Maxing Out Space)
Tested:◦ 10 Entry Maximum◦ 20 Entry Maximum◦ 50 Entry Maximum
Process:◦ Changed array size accordingly.
Result:◦ All results gave the desired output.
Input was given up to the maximum limit and no more was allowed.
“Execution” Testing Tested:
◦ Actual sending of the instructions to a file. Process:
◦ Entered Commands and verified their transmission to the file.
Result:◦ After a few problems with the controller and IO,
we were able to achieve successful transmission.
Dynamic Cursor Test Tested:
◦ The cursor’s accuracy on the Scrolling Screen. Process:
◦ Entered commands and verified their transmission.
◦ Checked the current command being changed with the cursor’s position on the Scrolling Screen.
Results:◦ After making changes to the Scrolling screen’s
interactionwith the controller, we achieved the desired result.
Clearing IO Test 2 Parts Tested:
◦ Clearing on the screen◦ Clearing in the document.
Process:◦ Entered commands and verified their
transmission.◦ Issued the “Clear” command.
Results:◦ After reconfiguring the controller interface and the
IO interfacewe achieved the desired results.
Student (Samuel Jackson – age 13): Samuel represents the common student
Professor (Dr. Hawking – age 45): Dr. Hawking is demonstrating the Turing machine
Breaker (Attila Dada – age 14): Attila loves to break things and will to cause glitches
Tinkerer (Albert Newton - age 12): Albert will tinker and play around with the machine
Personas
Use-Case Diagram
Actor: Student, Samuel Jackson Preconditions: The specific bit is a 0 Steps: The user enters the read bit command
on the GUI. The user sends the command to the
microcontroller on the Turing Machine. The microcontroller signals the sensor to read
the bit. Postconditions: The bit is read as a 0. Alternative Scenarios:
◦ Scenario One: The bit is incorrectly read as a 1.
Sample Use Case: Read a 0
ScheduleES
Current Status and Plan As of now we have successfully built the
entire machine and have functionality on it. We have completed the GUI and are
finalizing the coding for the actual machine to work behind the scenes.
In the next few weeks all we will be doing is testing all of our test cases and making the tweaks we need to get a final product done by the end of the semester.