In this 3-part lab, I created and programmed 3 different circuit all with different goals in mind. This lab was a true test of my schematic drawing, problem-solving, and soldering skills! I have so much fun creating these circuit and I learned so much doing so!
Part one of this lab was creating a circuit with two inputs that controlled two unique outputs. For my circuit, I used a momentary and maintained switch, which turned on a red and yellow LED respectively.
In order to choose resistors for my LEDs, I had to calculate the amount of resistance I needed depending on voltage and current. My teensyduino has 5V of supply voltage. Both the red and yellow LEDs had 1.8V of forward voltage (more or less) and 20mA of current. Using the resistance equation, I calculated that I needed 160 Ohms of resistance. Because there isn't a 160 Ohm resistor, I rounded up to the next highest which was 220 Ohms. I used 3.3K Ohm resistors for the switches because I needed high resistance for these elements.
I created a schematic on Fritzing of the circuit before putting it together to get a better understanding of how all the components would connect. One important take away from drawing this schematic was how the switches get set up. I learned that they have 3 pins, one is connected to power, one is connected to ground, and one runs back to the microcontroller to communicate if the switch is open or closed.