User Tools

Site Tools


haas:fall2024:c4eng:projects:stl2

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:stl2 [2024/09/30 15:22] – [RUBRIC] wedgehaas:fall2024:c4eng:projects:stl2 [2024/10/07 10:55] (current) – [Components and wiring] wedge
Line 4: Line 4:
 </WRAP> </WRAP>
  
-======PROJECT: Seeing The Light (STL1)======+======PROJECT: Seeing The Light (STL2)======
  
 =====OBJECTIVE===== =====OBJECTIVE=====
-We continue our explorations of the electronics kit, by adding additional LEDs to control them in unison with a C program on our pi, having them count in binary.+Time to explore optimizing our logic further, through the use of a loop and demonstrating the effectiveness of our logic by scaling up the number of LEDs in our counter (to at least 8).
  
 =====PROCESS===== =====PROCESS=====
Line 20: Line 20:
  
 =====TASK===== =====TASK=====
-After exploring, assembling, and testing the intended circuit (LEDs), adapt the provided C code to use the bank of connected LEDs to count in binary from 0000 to 1111 (0 to 15).+After exploring, assembling, and testing the intended circuit (8+ LEDs), adapt the provided C code to use the bank of connected LEDs to count in binary from 00000000 to at least 11111111 (0 to 255).
  
-Using the current value of count, your task is to make use of **if** statements and **bitwise logic** to determine from an ongoing count the state of the individual bits.+Using the current value of count, your task is to make use of ONE **if** statement and copious use of **bitwise logic** to determine from an ongoing count the state of the individual bits.
  
-It is your task to write a C program that interfaces successfully with four independently connected LED circuits, arranged in some orientation to ascertain an order or positioning, where your program will (in endless fashion, or until being manually interrupted) display a count (in binary) of values from 0 to 15 (then rollover, or reset).+It is your task to write a C program that interfaces successfully with the eight or more independently connected LED circuits, arranged in some orientation to ascertain an order or positioning, where your program will (in endless fashion, or until being manually interrupted) display a count (in binary) of values from 0 to at least 255 (then rollover, or reset).
  
 If "1" means the LED in that position is ON, and "0" means the LED in that position is OFF, then you want to write a program that performs the following progression (over and over again): If "1" means the LED in that position is ON, and "0" means the LED in that position is OFF, then you want to write a program that performs the following progression (over and over again):
  
 <code> <code>
-0 0 0 0 +0 0 0 0 0 0 0 0 
-0 0 0 1 +0 0 0 0 0 0 0 1 
-0 0 1 0 +0 0 0 0 0 0 1 0 
-0 0 1 1 +0 0 0 0 0 0 1 1 
-0 1 0 0 +0 0 0 0 0 1 0 0 
-0 1 0 1 +0 0 0 0 0 1 0 1 
-0 1 1 0 +0 0 0 0 0 1 1 0 
-0 1 1 1 +0 0 0 0 0 1 1 1 
-1 0 0 0 +0 0 0 0 1 0 0 0 
-1 0 0 1 +. . . 
-1 0 1 0 +1 1 1 1 1 0 0 1 
-1 0 1 1 +1 1 1 1 1 0 1 0 
-1 1 0 0 +1 1 1 1 1 0 1 1 
-1 1 0 1 +1 1 1 1 1 1 0 0 
-1 1 1 0 +1 1 1 1 1 1 0 1 
-1 1 1 1   <-- 15, the maximum value to display +1 1 1 1 1 1 1 0 
-0 0 0 0   <-- 0, we "roll over" and start again +1 1 1 1 1 1 1 1   <-- 255, the maximum value to display when there are 8 bits/LEDs 
-0 0 0 1 +0 0 0 0 0 0 0 0   <-- 0, we "roll over" and start again 
-0 0 1 0 +0 0 0 0 0 0 0 1 
-...+0 0 0 0 0 0 1 0 
 +. . .
 </code> </code>
 +
 =====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 56: Line 58:
 lab46:~/src/SEMESTER/DESIG$ grabit DESIG PROJECT lab46:~/src/SEMESTER/DESIG$ grabit DESIG PROJECT
 </cli> </cli>
 +
 +=====Components and wiring=====
 +
 +An example of one way to wire up the LED bar:
 +
 +{{:haas:fall2019:c4eng:projects:ledbar.png?400|}}
  
 =====EDIT===== =====EDIT=====
haas/fall2024/c4eng/projects/stl2.1727709731.txt.gz · Last modified: 2024/09/30 15:22 by wedge