User Tools

Site Tools


haas:fall2021:common:projects:iwb1

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
haas:fall2021:common:projects:iwb1 [2021/09/26 13:01] – [Wiring up our circuit] wedgehaas:fall2021:common:projects:iwb1 [2021/09/28 12:42] (current) – [Reading] wedge
Line 8: Line 8:
   * two buttons (one to increment the count, one to decrement the count)   * two buttons (one to increment the count, one to decrement the count)
 =====Abstraction===== =====Abstraction=====
-{{page>haas:fall2020:common:projects:abstraction&noheader}}+{{page>haas:fall2021:common:projects:abstraction&noheader}}
  
 =====Locational Awareness===== =====Locational Awareness=====
-{{page>haas:fall2020:common:projects:location&noheader}}+{{page>haas:fall2021:common:projects:location&noheader}}
  
 =====Reading===== =====Reading=====
Line 36: Line 36:
  
 <cli> <cli>
-yourpi:~/src/desig/iwb1$ gpio readall+yourpi:~/src/SEMESTER/DESIG/iwb1$ gpio readall
  +-----+-----+---------+------+---+---Pi 4B--+---+------+---------+-----+-----+  +-----+-----+---------+------+---+---Pi 4B--+---+------+---------+-----+-----+
  | BCM | wPi |   Name  | Mode | V | Physical | V | Mode | Name    | wPi | BCM |  | BCM | wPi |   Name  | Mode | V | Physical | V | Mode | Name    | wPi | BCM |
Line 114: Line 114:
  
 =====Program===== =====Program=====
-It is your task to compile, run, and understand a program to interface with the LEDs (light emitting diodes) and button. The button provides **input** into the mix, instead of just generating output (ie adjusting the state of the LED).+It is your task to compile, run, and understand a program to interface with the LEDs (light emitting diodes) and button. The buttons provide **input** into the mix, instead of just generating output (ie adjusting the state of the LED).
  
-The provided program performs a similar operation as in the previous led1 project; it is your task to:+The provided source code (via grabit) is set up to provide the infrastructure to support both the LEDs and the buttons for this project. While you have to determine where they interface, the code will initialize the pins as appropriate. Your main task is to:
  
-  * expand the program to support FOUR LEDs+  * implement a program that counts 4 LEDs in the direction input specifies 
 +    * if one button is pressed, increment the count from the current value to 15, rolling over to 0 as needed 
 +    * if the other button is pressed, decrement the count from the current value to 0, rolling over to 15 as needed 
 +    * have a 50mS - 500mS delay between state changes 
 +    * pressing the button enables the change for that next state (after the current delay expires) 
 +  * implement support for FOUR LEDs
     * each LED connected to a unique GPIO line     * each LED connected to a unique GPIO line
-  * adapt the program to "act" on button presses. That is, it only proceeds from one step to the next when you press the button. +  * implement support for TWO buttons 
-    * NOTE: you may discover there to be "noise" or undesired behaviour when pressing the button and expecting a clean action. This can be cleaned up with additional program logic. +    * adapt the program to "act" on button presses. That is, it only proceeds from one step to the next when you press button. 
-  * do NOT remove the delay. You may shorten (no shorter than 50mS) or lengthen the delay, but do not remove it entirely.+
 ====Grabbing project resources (on lab46)==== ====Grabbing project resources (on lab46)====
 I have prepared a **grabit** for resources related to this project. To obtain: I have prepared a **grabit** for resources related to this project. To obtain:
  
 <cli> <cli>
-lab46:~/src/desig$ grabit desig iwb1 +lab46:~/src/SEMESTER/DESIG$ grabit desig iwb1 
-make: Entering directory '/var/public/SEMESTER/desig/iwb1' +make: Entering directory '/var/public/SEMESTER/DESIG/iwb1' 
-'/var/public/SEMESTER/desig/iwb1/Makefile' -> '/home/user/src/desig/iwb1/Makefile' +'/var/public/SEMESTER/DESIG/iwb1/Makefile' -> '/home/user/src/SEMESTER/DESIG/iwb1/Makefile' 
-'/var/public/SEMESTER/desig/iwb1/iwb1.c' -> '/home/user/src/desig/iwb1/iwb1.c' +'/var/public/SEMESTER/DESIG/iwb1/iwb1.c' -> '/home/user/src/SEMESTER/DESIG/iwb1/iwb1.c' 
-make: Leaving directory '/var/public/SEMESTER/desig/iwb1' +make: Leaving directory '/var/public/SEMESTER/DESIG/iwb1' 
-lab46:~/src/desig+lab46:~/src/SEMESTER/DESIG
 </cli> </cli>
  
Line 181: Line 186:
  
 <cli> <cli>
-lab46:~/src/desig/iwb1$ submit desig iwb1 iwb1.c +lab46:~/src/SEMESTER/DESIG/iwb1$ make submit
-Submitting desig project "iwb1": +
-    -> iwb1.c(OK) +
- +
-SUCCESSFULLY SUBMITTED+
 </cli> </cli>
  
Line 196: Line 197:
 *:iwb1:post picture of unpowered layout to #desig and get approval [8/8] *:iwb1:post picture of unpowered layout to #desig and get approval [8/8]
 *:iwb1:post picture to #desig by Sunday before deadline [4/4] *:iwb1:post picture to #desig by Sunday before deadline [4/4]
-*:iwb1:post picture of powered LEDs in layout to #desig [8/8] +*:iwb1:post picture of button-enabled LED count in layout to #desig [8/8] 
 *:iwb1:grabit on the code on lab46 by Sunday before deadline [4/4] *:iwb1:grabit on the code on lab46 by Sunday before deadline [4/4]
 *:iwb1:iwb1.c code adequately modified per project requirements [20/20] *:iwb1:iwb1.c code adequately modified per project requirements [20/20]
haas/fall2021/common/projects/iwb1.1632661297.txt.gz · Last modified: 2021/09/26 13:01 by wedge