User Tools

Site Tools


notes:c4eng:fall2023:projects:stl0

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:fall2023:projects:stl0 [2023/09/20 23:27] – [VOLTAGE / VOLTS] mwinter4notes: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
 </cli> </cli>
 +
 +====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:
 +<code/>hg pull;hg update</code>
 +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 41: Line 47:
 ====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 60: Line 67:
 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 <code/> gpio redall </code> 
 +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 71: 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=====
  
notes/c4eng/fall2023/projects/stl0.1695252441.txt.gz · Last modified: 2023/09/20 23:27 by mwinter4