This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
notes:c4eng:fall2022:projects:vcc0 [2022/09/14 17:13] – [COMPONENTS] cmillica | notes:c4eng:fall2022:projects:vcc0 [2022/09/14 21:14] (current) – [COMPONENTS] ilaface | ||
---|---|---|---|
Line 5: | Line 5: | ||
====RELATIONAL OPERATORS==== | ====RELATIONAL OPERATORS==== | ||
- | ^ Operator | + | ^ Operator |
- | | == | 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 |
- | | != | 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 |
- | | > | 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 |
- | | < | 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 |
- | | >= | 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 |
====WIRINGPI INSTALL==== | ====WIRINGPI INSTALL==== | ||
Line 38: | Line 38: | ||
* https:// | * https:// | ||
+ | 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. | ||
====COMPONENTS==== | ====COMPONENTS==== | ||
**Breadboard** | **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, | + | 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 |
**GPIO Expansion Board** | **GPIO Expansion Board** | ||
Line 114: | 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: | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | 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. | ||