User Tools

Site Tools


haas:fall2024:c4eng:projects:ptb0

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:fall2024:c4eng:projects:ptb0 [2024/10/07 10:42] – [GRABIT] wedgehaas: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 speakerall 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, and have the also independently-connected LEDs light up or turn off to mark whether the button is pressed/speaker is activated or not. +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/speaker is active. +
- +
-Red means button is not pressed/speaker is inactive. +
 =====GRABIT===== =====GRABIT=====
 To assist with consistency across all implementations, data files for use with this project are available on lab46 via the **grabit** tool. Be sure to obtain it and ensure your implementation properly works with the provided data. To assist with consistency across all implementations, data files for use with this project are available on lab46 via the **grabit** tool. Be sure to obtain it and ensure your implementation properly works with the provided data.
Line 33: Line 28:
 </cli> </cli>
  
-=====Circuits===== +=====Components and wiring===== 
-{{:haas:fall2019:c4eng:projects:ledbar.png?400|}}+ 
 +Button pinout:
  
-{{:haas:fall2021:common:projects:iwb1partslist.png?400|}}+{{:haas:fall2024:c4eng:projects:img_0218.jpeg?400|}}
  
 +Button circuit:
  
 +{{:haas:fall2024:c4eng:projects:img_0219.jpeg?400|}}
 =====EDIT===== =====EDIT=====
 You will want to go [[/notes/c4eng/fall2024/projects/ptb0|here]] to edit and fill in the various sections of the document: You will want to go [[/notes/c4eng/fall2024/projects/ptb0|here]] to edit and fill in the various sections of the document:
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     -> SENSORY ORGANS SENSE PERTINENT ELECTROMAGNETIC RADIATION+
     OTHERWISE:     OTHERWISE:
-        DEACTIVATE THE GREEN LED -> SENSORY ORGANS NO LONGER SENSE ELECTROMAGNETIC RADIATION +        DEACTIVATE THE LED -> SENSORY ORGANS NO LONGER SENSE ELECTROMAGNETIC RADIATION 
-        ACTIVATE THE RED LED     -> SENSORY ORGANS SENSE PERTINENT ELECTROMAGNETIC RADIATION +   
-        DEACTIVATE THE SPEAKER   -> SENSORY ORGANS NO LONGER SENSE ELECTROMAGNETIC RADIATION +
-    +
     DELAY AT LEAST FIFTY MILLISECONDS     DELAY AT LEAST FIFTY MILLISECONDS
 </code> </code>
Line 102: Line 96:
  
 <code> <code>
-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:clean compile, no compiler messages [13/13] *:ptb0:clean compile, no compiler messages [13/13]
-*:ptb0:speaker and button each hooked to unique GPIOs [13/13] +*:ptb0:LED and button each hooked to unique GPIOs [13/13] 
-*:ptb0:speaker only makes noise on activation [13/13+*:ptb0:LED only lights up on activation [26/26
-*:ptb0:button state is read, on press code activates speaker [13/13] +*:ptb0:button state is read, on button press code activates LED [26/26]
-*:ptb0:button state (ON, OFF) is indicated by two LEDs [13/13]+
 *:ptb0:code tracked in lab46 semester repo [13/13] *:ptb0:code tracked in lab46 semester repo [13/13]
 </code> </code>
haas/fall2024/c4eng/projects/ptb0.1728297761.txt.gz · Last modified: 2024/10/07 10:42 by wedge