This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
haas:fall2023:c4eng:projects:eap0 [2023/10/23 13:34] – created wedge | haas:fall2023:c4eng:projects:eap0 [2023/10/23 14:27] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 4: | Line 4: | ||
</ | </ | ||
- | ======PROJECT: | + | ======PROJECT: |
=====OBJECTIVE===== | =====OBJECTIVE===== | ||
- | Buttons | + | Explore some new component from the electronics kit: construct |
=====PROCESS===== | =====PROCESS===== | ||
Do note, the productive way to go about this project involves taking the following steps: | Do note, the productive way to go about this project involves taking the following steps: | ||
Line 20: | Line 19: | ||
=====TASK===== | =====TASK===== | ||
- | Taking our knowledge | + | This is part one of a sequence: decide on some project you’d like to pursue, this project lays the groundwork of understanding of individual components. |
- | * wire up the multicolored LED (3 separate wiringPi GPIO pins) | + | * Part 1: Select some component(s) to explore (circuit and program |
- | * we are going to use software PWM to control this, which will give us 100 levels of adjustment | + | * Part 2: integrate together on some new circuit with other components (circuit and program |
- | * wire up 3 buttons | + | * Part 3: Finished product (circuit, program) |
- | * wire up the rocker switch to its own wiringPi GPIO | + | |
- | * one direction will indicate positive | + | |
- | * the other direction will indicate negative | + | |
- | * implement logic so that, with the rocker switch in a given position, when pressing one of the color buttons, it adjusts that component of the multicolor LED in the appropriate direction (by a step of 10). | + | |
- | * if a color value exceeds or dips below the allowed range, cycle it to the opposite end | + | |
+ | Peruse the [[https:// | ||
+ | |||
+ | And document your selection, progress, and final results on the project documentation page! | ||
=====GRABIT===== | =====GRABIT===== | ||
- | To assist with consistency across all implementations, | + | No grabit |
- | < | + | It would be highly recommended to create a **eap0/** directory in your repository, alongside your other projects, and perhaps to call your program **eap0.c** |
- | lab46:~/src/ | + | |
- | </ | + | The **Makefile** from other projects can be adapted to work with your current endeavour (would only need to change perhaps one line near the top of the **Makefile** in a text editor). |
=====EDIT===== | =====EDIT===== | ||
- | You will want to go [[/ | + | You will want to go [[/ |
- | + | ||
- | * [[/ | + | |
- | + | ||
- | {{page> | + | |
- | + | ||
- | =====STRATEGY===== | + | |
- | The general flow of the process (one way of going about it, anyway) can be described as follows: | + | |
- | + | ||
- | < | + | |
- | SET REDVAL, GRNVAL, BLUVAL TO ZERO | + | |
- | REPEAT INFINITELY: | + | |
- | SHOULD THE INCREMENT POSITION ON THE SWITCH BE SET: | + | |
- | SET DIRECTION TO POSITIVE ONE | + | |
- | OTHERWISE: | + | |
- | SET DIRECTION TO NEGATIVE ONE | + | |
- | + | ||
- | SHOULD THE RED BUTTON BE PRESSED: | + | |
- | ADJUST REDVAL BY (TEN TIMES DIRECTION) | + | |
- | + | ||
- | SHOULD THE GREEN BUTTON BE PRESSED: | + | |
- | ADJUST GRNVAL BY (TEN TIMES DIRECTION) | + | |
- | + | ||
- | SHOULD THE BLUE BUTTON BE PRESSED: | + | |
- | ADJUST BLUVAL BY (TEN TIMES DIRECTION) | + | |
- | ACTIVATE MULTICOLOR LED TO RGB VALUES CURRENTLY SET | + | * [[/ |
- | + | ||
- | DELAY AT LEAST FIFTY MILLISECONDS | + | |
- | COMMENT: INFINITE REPEAT BLOCK CONCLUDES | + | {{page>notes: |
- | </code> | + | |
=====SUBMISSION===== | =====SUBMISSION===== | ||
Line 111: | Line 81: | ||
< | < | ||
- | 65:ptb2:final tally of results (65/65) | + | 78:eap0:final tally of results (78/78) |
- | *:ptb2:used grabit to obtain project by the Sunday prior to duedate [6/6] | + | *:eap0:clean compile |
- | *:ptb2:clean compile, no compiler messages [7/7] | + | *:eap0:picture of working test circuit posted to class discord |
- | *:ptb2:switch is read and adjusts color level direction | + | *:eap0:code adequately initializes and tests, operates component |
- | *:ptb2:each button adjusts its pertinent color level [13/13] | + | *:eap0:code tracked in lab46 semester repo [14/14] |
- | *:ptb2:multicolor LED displays current set RGB levels | + | *:eap0:project documentation page updated with pertinent information |
- | *:ptb2:code tracked in lab46 semester repo [13/13] | + | |
</ | </ | ||