This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
haas:fall2024:c4eng:projects:ptb0 [2024/10/07 10:42] – [GRABIT] wedge | haas:fall2024:c4eng:projects:ptb0 [2024/10/13 14:03] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 20: | Line 20: | ||
=====TASK===== | =====TASK===== | ||
- | After exploring, assembling, and testing the intended circuit (1 button, 1 red LED, 1 green LED, 1 speaker- all independently connected to the pi via separate GPIO pins), adapt the provided C code to provide software control to coordinate button presses with speaker activations, | + | After exploring, assembling, and testing the intended circuit (1 button, 1 LED- each independently connected to the pi via separate GPIO pins), adapt the provided C code to provide software control to coordinate button presses with LED. |
- | + | ||
- | Green means button is pressed/ | + | |
- | + | ||
- | Red means button is not pressed/ | + | |
=====GRABIT===== | =====GRABIT===== | ||
To assist with consistency across all implementations, | To assist with consistency across all implementations, | ||
Line 33: | Line 28: | ||
</ | </ | ||
- | =====Circuits===== | + | =====Components and wiring===== |
- | {{: | + | |
+ | Button pinout: | ||
- | {{:haas:fall2021:common:projects:iwb1partslist.png?400|}} | + | {{:haas:fall2024:c4eng:projects:img_0218.jpeg?400|}} |
+ | Button circuit: | ||
+ | {{: | ||
=====EDIT===== | =====EDIT===== | ||
You will want to go [[/ | You will want to go [[/ | ||
Line 52: | Line 50: | ||
REPEAT: | REPEAT: | ||
SHOULD THE BUTTON BE PRESSED: | SHOULD THE BUTTON BE PRESSED: | ||
- | ACTIVATE THE GREEN LED -> SENSORY ORGANS SENSE PERTINENT ELECTROMAGNETIC RADIATION | + | ACTIVATE THE LED -> SENSORY ORGANS SENSE PERTINENT ELECTROMAGNETIC RADIATION |
- | DEACTIVATE THE RED LED -> SENSORY ORGANS NO LONGER SENSE ELECTROMAGNETIC RADIATION | + | |
- | ACTIVATE THE SPEAKER | + | |
OTHERWISE: | OTHERWISE: | ||
- | DEACTIVATE THE GREEN LED -> SENSORY ORGANS NO LONGER SENSE ELECTROMAGNETIC RADIATION | + | DEACTIVATE THE LED -> SENSORY ORGANS NO LONGER SENSE ELECTROMAGNETIC RADIATION |
- | | + | |
- | DEACTIVATE THE SPEAKER | + | |
- | | + | |
DELAY AT LEAST FIFTY MILLISECONDS | DELAY AT LEAST FIFTY MILLISECONDS | ||
</ | </ | ||
Line 102: | Line 96: | ||
< | < | ||
- | 91:ptb0:final tally of results (91/91) | + | 104:ptb0:final tally of results (104/104) |
*:ptb0:used grabit to obtain project by the Sunday prior to duedate [13/13] | *:ptb0:used grabit to obtain project by the Sunday prior to duedate [13/13] | ||
*: | *: | ||
- | *:ptb0:speaker | + | *:ptb0:LED and button each hooked to unique GPIOs [13/13] |
- | *:ptb0:speaker | + | *:ptb0:LED only lights up on activation [26/26] |
- | *: | + | *: |
- | *: | + | |
*:ptb0:code tracked in lab46 semester repo [13/13] | *:ptb0:code tracked in lab46 semester repo [13/13] | ||
</ | </ |