User Tools

Site Tools


notes:c4eng:fall2022:projects:vcc0

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
notes:c4eng:fall2022:projects:vcc0 [2022/09/14 17:03] – [RELATIONAL OPERATORS] cmillicanotes:c4eng:fall2022:projects:vcc0 [2022/09/14 21:14] (current) – [COMPONENTS] ilaface
Line 5: Line 5:
 ====RELATIONAL OPERATORS==== ====RELATIONAL OPERATORS====
  
-^ Operator   ^ Description +^ Operator   ^ Description                                                                                   ^ Example ^ 
-| ==         | Checks if the values are equal or not, If yes, condition is true +| ==         | Checks if the values are equal or not, If yes, condition is true                              | (A == B)| 
-| !=         | Checks if the values are equal or not, If values are not equal, then condition is true +| !=         | Checks if the values are equal or not, If values are not equal, then condition is true        | (A != B)| 
-| >          | Checks if the value of left operand is greater than the value of right operand +| >          | Checks if the value of left operand is greater than the value of right operand                | (A > B) | 
-| <          | Checks if the value of the left operand is less than the value of right operand +| <          | Checks if the value of the left operand is less than the value of right operand               | (A < B) | 
-| >=         | Checks if the value of left operand is greater than or equal to the value of the right operand +| >=         | Checks if the value of left operand is greater than or equal to the value of the right operand| (A >= B)| 
-| <=         | Checks if the value of left operand is less than or equal to the value of the right operand+| <=         | Checks if the value of left operand is less than or equal to the value of the right operand   | (A <= B)|
 ====WIRINGPI INSTALL==== ====WIRINGPI INSTALL====
  
Line 38: Line 38:
   * https://www.youtube.com/watch?v=6WReFkfrUIk   * https://www.youtube.com/watch?v=6WReFkfrUIk
  
 +The purpose of the breadboard is to make quick electrical connections between components- like resistors, LEDs, capacitors, etc- so that you can test your circuit before permanently soldering it together.  Breadboards have many small sockets on them, and some groups of sockets are electrically connected to each other.  On the underside of the board there are many small metal strips which physically connect certain groups of sockets together and allow electricity to flow freely between them.  These strips are probably not visible on the underside of your breadboard.
 ====COMPONENTS==== ====COMPONENTS====
-A breadboard consists of plastic block holding a matrix of electrical sockets of a size suitable for gripping thin connecting wire, component wires or the pins of transistors and integrated circuits. The sockets are connected inside the board, usually in rows of five sockets. +**Breadboard** 
 + 
 +A breadboard consists of plastic block holding a matrix of electrical sockets of a size suitable for gripping thin connecting wire, component wires or the pins of transistors and integrated circuits. The sockets are connected inside the board (by metal clips), in rows of five sockets horizontally.   
 + 
 +**GPIO Expansion Board** 
 + 
 +The GPIO Expansion board connects to the pins of your pi via a ribbon cable. The GPIO expansion board is then fitted onto the breadboard making the functionality of the pins available to use on the breadboard. 
 + 
 +**220 ohm resistors x4** 
 + 
 +Resistors limit or regulate the flow of electrical current in an electronic circuit. Too much current going to the LED can cause the LED to burn out as LEDs will take as much current as you give them, but not without a price. Limiting the current to the LED bulb using a resistor ensures that we supply enough current to light the bulb without supplying too much current burning out the bulb. 
 + 
 +**Jumper leads** 
 + 
 +Jumper leads are wires used to connect to the load components (LEDs) to the GPIO BCM pins.
 ====CIRCUIT==== ====CIRCUIT====
  
Line 100: Line 115:
 Provided there are no apparent errors, close out of that terminal and open a new one, then the **gpio** tool and related WiringPi functionality should now be available. Provided there are no apparent errors, close out of that terminal and open a new one, then the **gpio** tool and related WiringPi functionality should now be available.
 =====PROGRAM===== =====PROGRAM=====
 +Declare
 + int cont = 0;
 + int num_cont = 8:
 +
 +Make sure to record wiring pi assignments into pin array. Ex:
 + pin[0] = 0
 + pin[1] = 2
 + pin[2] = 3
 + pin[3] = 4
  
 +Remember to use if and else statements in while statement. Digital write goes after all if and else statements. Else uses LOW meaning off and if uses HIGH meaning on.
  
notes/c4eng/fall2022/projects/vcc0.1663175017.txt.gz · Last modified: 2022/09/14 17:03 by cmillica