top of page
  • seanriddle9

Lab 2

The first circuit I constructed with the Arduino was a simple test using the example Blink code modified to activate an external LED:







Part 1: Digital I/O

I had a lot of trouble with this part. Here are photos of the first few attempts I made.





At first I didn't really understand what the pull-down resistor was or where it connected to the circuit, and I was using the wrong pin numbers at first.


I did eventually get it working; here is the first version of the circuit that worked properly with 1 LED:



Here is the final I/O circuit with two inputs and two outputs:




In this circuit, pressing a button connects one of the digital input pins to the 3.3V power. The arduino code recognizes this input and in turn activates one of the digital output pins, which sends a current to an LED through the appropriate resistor; the current then goes to ground. The code dictates which input pin corresponds to which output pin. When the button is released, that input pin is then connected to ground and the LED is turned off.


I used 100 ohm resistors for the LEDs, as per these calculations:

(5V - 2V)/0.02 = 150 ohms


Here is the code for this circuit:




Here is the schematic for the circuit:



Part 2: Digital I/O w/ Programmable LED Strip

Here are process photos for the Neopixel soldering and integration:





Here is the video of the final circuit working:


The first button press sends a signal to a digital pin on the arduino, which activates a section of code that tells each LED on the strip to cycle through random colors at the same time, at an interval of half a second. The second button press goes to a different pin, which corresponds to another section of the code which tells the LEDs to light sequentially at half-second intervals, all in the same color.


Here is the code used for this circuit:

Here is the schematic for the circuit:



Part 3: Soldered Breakout Board

Here are the process images for the creation of my breakout board:






Here is the final product:




In this circuit, current from the arduino (specifically an output pin defined by the code) goes to the breakout board, through a resistor, activates two LEDs, and flows out of the breakout board to ground.

5 views0 comments

Recent Posts

See All

Comentários


bottom of page