Title: A Simulation of Directional Lights Circuit Final Project ICS665
1A Simulation of Directional Lights CircuitFinal
Project ICS665
- Members
- Astrid Tomsic
- Dan Yi
- Frank Tien
2Outline
- Simulation of Directional lights circuit
- What the Circuit can do
- Picture of a Circuit Board
- A Closer Look at an EPROM and Flip Flop
- GUI interface (Screen shot)
- System Analysis Phase
- Improvements to the Design
- Use Case Revision
- Scenario Revision
- Implementation Phase
- Software Structures
- Documentation
- JavaDoc
- Run Procedure Problem
- Conclusion
3Simulation of Directional Lights Circuit
What the Circuit can do
- The circuit simulation consists of three parts
- A switch that users can control in the GUI
interface. - 4 Lights (LEDs) that show the result in the
simulated circuit. - A slider that adjusts the resistance in the
circuit, causing the frequency of the lights to
increase or decrease. - 2 Registers a flip flop and an EPROM.
- A multimedia demo that explains the elements of
the circuit and how it works.
4Simulation of Directional Lights Circuit
Picture of a Circuit Board
5Simulation of Directional Lights Circuit A
Closer Look at the EPROM and Flip Flop
6Simulation of Directional Lights Circuit
GUI Interface (screen shot)
7System Analysis Phase Improvements to the Design
- To better meet our objectives of introducing
students to the basics of a directional lights
circuit and showing them that circuits can be
fun, we chose to implement the following - A slider that allows the user to adjust the
frequency of the lights. This simulates how
resistance can effect the circuit. - Added better labeling to the user interface to
help the student identify each component. - Added a new ClockView for the slider.
- Filmed a live circuit for the video demo with an
audio commentary.
8System Analysis Phase Use Case Revision
- An additional operate frequency slider has been
added where students can change the speed of the
directional leds (simulating resistance). This
enables students to see how operating the switch
and adjusting the resistance changes the state of
the lights.
9System Analysis Phase Scenario Revision
- Use Case
- Run circuit
- Participants
- Student
- Web browser
- Main Scenario
- Student launches web browser
- Student navigates to web site where applet is
located - System displays the video and circuit
- Student launches the video
- System plays the video
- Student clicks the switch on the circuit
- System shows lights going on continuously one by
one from left to right - Student adjusts the slider
- System shows lights going on faster or slower
- Student clicks switch again on the circuit
- System shows lights going on continuously one by
one in the opposite direction - Alternative Scenario 1
10Implementation Phase Software Structures
- Software patterns were used when implementing the
system. They helped us to develop code that is
well structured and cohesive. We found that as
designers, relating to software patterns in our
discussions made our communication more
efficient. We used the following patterns in the
design - Observer pattern
- Main class triggers the interface and starts to
listen for events that will notify a class when
an event (e.g. switch clicked or slider adjusted)
takes place. - State pattern
- Tells the circuit if the switch is open or
closed. - Strategy pattern
- Used to determine the direction of the LEDs.
- Factory patterns
- Used to create the 4 LEDs.
- Iterator
- Tells the circuit which light should be on or
off.
11Documentation JavaDoc
- The documentation for the circuit can be found in
the Javadoc located with the applet. We have
included configuration steps to enable the source
code to be compiled and run in the Jbuilder
environment.
12Documentation Run Procedure Problem
- We programmed the applet in Jbuilder. It compiles
and works well when we run it. - We can view the applet in the Jbuilder viewer.
However, we cannot make it work after we embedded
it into a html page. The applet can be loaded but
cannot be initialized. - We think there might be two problems in our code
- We should use swing instead of AWT
- There might be something wrong with our xml code
that defines the user interface.
13Conclusion
- Incorporating software patterns in our design
helped us as designers to improve the quality of
the code and they helped us to make modifications
much more efficiently. They also served to
improve discussions on the software design
because we could mention a pattern name and it
would allow us to envision how the code would be
structured. - By completing each of the software design phases,
we were able to build better quality software.
Each phase built on the previous phase but we
also found it invaluable to be able to go back
and modify some of our earlier assumptions and
ideas as we found new and better ways to do
things. - We envision that our simulation of a directional
digital circuit can be used to to increase
students understanding of how basic circuit
works and encourage them to explore further
topics in digital circuits.
14Questions and Future Improvements
- Enhance GUI functionalities (e.g. addition of
color movement of the switch different color
LEDs). - Increase circuit functionality (e.g. addition of
more complex circuit components to show their
interaction). - Improve the application level design.
- Improve multimedia capability (e.g. additional
multimedia resources).