This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
notes:c4eng:fall2023:projects:stl0 [2023/09/20 18:20] – [RESISTOR] defining and identification wjohns11 | notes:c4eng:fall2023:projects:stl0 [2023/09/21 01:30] (current) – [T-COBBLER / INTERFACE TO PI GPIO PINS] jparrish | ||
---|---|---|---|
Line 14: | Line 14: | ||
yourpi:~$ sudo dpkg -i wiringpi-latest.deb | yourpi:~$ sudo dpkg -i wiringpi-latest.deb | ||
</ | </ | ||
+ | |||
+ | ====ACCESSING STL0 FROM YOUR PI==== | ||
+ | Since you can't make and run the program on lab 46, you will need to add, commit, and push it onto your repository with the hg commands, so that you can pull it onto your pi. Once you've successflly pushed everything onto the repository, go to your pi and use this command to pull it back: | ||
+ | < | ||
+ | Once you've done that, you should be able to cd into the stl0 directory, where you can compile and run your program with the make and ./stl0 commands. If your breadboard is set up, and the stl0.c file is being applied to the right pin #, you might notice a change in the LED. | ||
+ | |||
====USING WIRINGPI: THE gpio TOOL==== | ====USING WIRINGPI: THE gpio TOOL==== | ||
Line 29: | Line 35: | ||
====VOLTAGE / VOLTS==== | ====VOLTAGE / VOLTS==== | ||
+ | Voltage is the electric potential between two points. Volts is the SI unit used for voltage. Voltage is often described as the " | ||
+ | For circuit projects using a breadboard and Raspberry Pi, the typical voltages are 3.3V and 5V. | ||
+ | |||
+ | //Input// on any of the Raspberry Pi's GPIO pins should **not** be 5V. The Raspberry Pi is not 5V tolerant. This is confusing, as there are pins to //output// 5V, which is used to power external components. | ||
====GROUND==== | ====GROUND==== | ||
The ground " | The ground " | ||
====AMPERAGE / AMPS==== | ====AMPERAGE / AMPS==== | ||
+ | Amperage is a measure of the magnitude of electrical current. | ||
====RESISTANCE / OHMS==== | ====RESISTANCE / OHMS==== | ||
+ | Resistance, or electrical resistance, is a measure of how difficult it is for current to flow. Resistance is measured in the SI unit Ohms. Resistors are components for implementing electrical resistance in a circuit. Resistance is equivalent to V/I, where V is voltage and I is current, derived from V=I*R. | ||
=====DIGITAL ELECTRONICS===== | =====DIGITAL ELECTRONICS===== | ||
Line 47: | Line 59: | ||
====BREADBOARD==== | ====BREADBOARD==== | ||
+ | A breadboard is a tool used for prototyping circuits without the need for soldering components onto a board. They typically come with detachable rails on the side, usually used (and marked) for power and ground. These red and blue marked strips are connected along the entire length of the columns. This allows you to power and ground multiple components easily. | ||
+ | Between these detachable rails are rows of 5 connected notches on either side of the divot in the middle. The 5 notches in each row are connected, allowing you to form circuits between attached components. | ||
+ | |||
====T-COBBLER / INTERFACE TO PI GPIO PINS==== | ====T-COBBLER / INTERFACE TO PI GPIO PINS==== | ||
GPIO.0 is actually GPIO17 on your T-cobbler | GPIO.0 is actually GPIO17 on your T-cobbler | ||
+ | To discover this, you can use the command < | ||
+ | This will bring up a table of all the pins on the t-cobbler. On your t-cobbler, you will count the pins left to right starting at one, until you get to the pin you are using. Then, you will find the number your pin is at, then use the list to line it up with the wpi name. The Wpi name is the one we will be referring to whenever we need to write or indicate a pin in our code | ||
====LED==== | ====LED==== | ||
Line 63: | Line 80: | ||
====RESISTOR==== | ====RESISTOR==== | ||
+ | A resistor is a component for implementing electrical resistance in a circuit. This is useful for lowering the flow of current across a circuit. By applying a resistor to a circuit with an LED, you could prevent the LED from burning out, or simply make it dimmer without needing to adjust voltage. Resistors have color coded bands on the body of them to indicate resistance in Ohms. For instance, 3 bands that are orange, orange, red, indicates a 330 Ohm resistor. The color coding is defined in the international standard IEC 60062. | ||
=====TARGET CIRCUIT===== | =====TARGET CIRCUIT===== | ||