This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
haas:fall2021:common:projects:iwb1 [2021/09/26 12:11] – [Reading] wedge | haas: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> | + | {{page> |
=====Locational Awareness===== | =====Locational Awareness===== | ||
- | {{page> | + | {{page> |
=====Reading===== | =====Reading===== | ||
Line 36: | Line 36: | ||
<cli> | <cli> | ||
- | yourpi: | + | yourpi: |
| | ||
| BCM | wPi | | | BCM | wPi | | ||
Line 86: | Line 86: | ||
This circuit is basically an enhancement upon the one you made for the led1 project. So the parts needed has some similar items, but also some new ones. | This circuit is basically an enhancement upon the one you made for the led1 project. So the parts needed has some similar items, but also some new ones. | ||
- | In this project, we will be hooking up two different peripherals to some of our Raspberry Pi pins: a set of light emitting diodes (LED) and a button, and then proceed to interface with them to access and control their state (of being ON or OFF). | + | In this project, we will be hooking up two different peripherals to some of our Raspberry Pi pins: a set of light emitting diodes (LED) and buttons, and then proceed to interface with them to access and control their state (each one in some combination |
You have likely encountered LEDs endlessly in your everyday life: commonly used as a "power light", | You have likely encountered LEDs endlessly in your everyday life: commonly used as a "power light", | ||
Line 94: | Line 94: | ||
For this endeavour, you will need to obtain the following items out of the electronics kit you obtained for the class: | For this endeavour, you will need to obtain the following items out of the electronics kit you obtained for the class: | ||
- | {{ :haas:fall2020: | + | {{ :haas:fall2021: |
=====The Circuit to Construct===== | =====The Circuit to Construct===== | ||
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 | + | It is your task to compile, run, and understand a program to interface with the LEDs (light emitting diodes) and button. The buttons provide |
- | The provided | + | The provided |
- | * expand the program to support FOUR LEDs | + | * implement a program |
+ | * 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 | ||
* each LED connected to a unique GPIO line | * each LED connected to a unique GPIO line | ||
- | * adapt the program to " | + | |
- | * NOTE: you may discover there to be " | + | |
- | * 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: | + | lab46: |
- | make: Entering directory '/ | + | make: Entering directory '/ |
- | '/ | + | '/ |
- | '/ | + | '/ |
- | make: Leaving directory '/ | + | make: Leaving directory '/ |
- | lab46: | + | lab46: |
</ | </ | ||
Line 181: | Line 186: | ||
<cli> | <cli> | ||
- | lab46: | + | lab46: |
- | Submitting desig project " | + | |
- | -> iwb1.c(OK) | + | |
- | + | ||
- | SUCCESSFULLY SUBMITTED | + | |
</ | </ | ||
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] |
*: | *: | ||
*: | *: |