User Tools

Site Tools


lab_6

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

lab_6 [2017/11/07 17:06]
hutch [Grading]
lab_6 [2018/11/14 13:39] (current)
hutch
Line 27: Line 27:
   * Use a **''​verifySequence''​** state machine to verify that the sequence of user touches matches the computer-generated sequence.   * Use a **''​verifySequence''​** state machine to verify that the sequence of user touches matches the computer-generated sequence.
   * Use a **''​simonControl''​** state machine to control everything at the top level.   * Use a **''​simonControl''​** state machine to control everything at the top level.
 +
 +==== Milestones ====
 +
 +You will complete this lab in three milestones:
 +  * Milestone 1: Implement the ''​buttonHandler''​ state machine and ''​simonDisplay''​ code. You pass off this milestone by demonstrating that your code works properly with the provided ''​buttonHandler_runTest()''​ code (it should look like the provided video). Also implement the ''​globals''​ code.
 +  * Milestone 2: Implement the ''​flashSequence''​ and ''​verifySequence''​ state machines. Demonstrate that these work properly by showing the TAs that your code models the behavior shown in the relevant video.
 +  * Milestone 3: Implement the top-level ''​simonControl''​ state machine so that you implement a Simon game with the the same behavior as shown in the demo video for the Simon game. Pass off your game to the TAs.
 +
 +----
  
 The figure below shows the "​architecture"​ for the Simon game and shows how the state machines communicate with each other. The figure below shows the "​architecture"​ for the Simon game and shows how the state machines communicate with each other.
Line 238: Line 247:
 // All buttonHandler_releasedDetected() does is return the value of this flag.  // All buttonHandler_releasedDetected() does is return the value of this flag. 
 // As such, the body of this function should only contain a single line of code. // As such, the body of this function should only contain a single line of code.
 +// If this function does more than return a boolean set by the buttonHandler state machine, you are going about
 +// this incorrectly.
 bool buttonHandler_releaseDetected();​ bool buttonHandler_releaseDetected();​
  
Line 608: Line 619:
             verifySequence_disable(); ​                                 // Interlock: first step of handshake.             verifySequence_disable(); ​                                 // Interlock: first step of handshake.
             verifySequence_tick(); ​                                    // Advance the verifySequence machine.             verifySequence_tick(); ​                                    // Advance the verifySequence machine.
 +            buttonHandler_tick();​
             utils_msDelay(TICK_PERIOD_IN_MS); ​                         // Wait for tick period.             utils_msDelay(TICK_PERIOD_IN_MS); ​                         // Wait for tick period.
             verifySequence_enable(); ​                                  // Interlock: second step of handshake.             verifySequence_enable(); ​                                  // Interlock: second step of handshake.
Line 644: Line 656:
 // This is the length of the sequence that you are currently working on,  // This is the length of the sequence that you are currently working on, 
 // not the maximum length but the interim length as // not the maximum length but the interim length as
-// the use works through the pattern one color at a time.+// the person playing the game works through the pattern one color at a time.
 uint16_t globals_getSequenceIterationLength();​ uint16_t globals_getSequenceIterationLength();​
  
Line 678: Line 690:
  
 You will call all of your tick functions and provide necessary initializations in the ''​main()''​ function that is contained by the ''​simonMain.c''​ file. You will call all of your tick functions and provide necessary initializations in the ''​main()''​ function that is contained by the ''​simonMain.c''​ file.
- 
----- 
-==== Milestones ==== 
- 
-You will complete this lab in three milestones: 
-  * Milestone 1: Implement the ''​buttonHandler''​ state machine and ''​simonDisplay''​ code. You pass off this milestone by demonstrating that your code works properly with the provided ''​buttonHandler_runTest()''​ code (it should look like the provided video). Also implement the ''​globals''​ code. 
-  * Milestone 2: Implement the ''​flashSequence''​ and ''​verifySequence''​ state machines. Demonstrate that these work properly by showing the TAs that your code models the behavior shown in the relevant video. 
-  * Milestone 3: Implement the top-level ''​simonControl''​ state machine so that you implement a Simon game with the the same behavior as shown in the demo video for the Simon game. Pass off your game to the TAs. 
  
 ---- ----
Line 709: Line 713:
   - Subtract 10% from the total score if more than one interrupt is missed during game play (up to 20 missed interrupts total).   - Subtract 10% from the total score if more than one interrupt is missed during game play (up to 20 missed interrupts total).
   - Subtract 20% from the total score if more than 20 interrupts are missed during normal game play.   - Subtract 20% from the total score if more than 20 interrupts are missed during normal game play.
 +
 +==== Submitting Source Code ====
 +Follow [[http://​ecen330wiki.groups.et.byu.net/​wiki/​doku.php?​id=submitting_source_code|this procedure]] to submit your source code to learning-suite.
 +
 +
  
    
lab_6.1510099599.txt.gz ยท Last modified: 2017/11/07 17:06 by hutch