Posts

Showing posts from February, 2024

AT219 Arduino Uno Programming Part (Lab 5)

Image
With this lab, we continued creating circuits using a breadboard and programming certain functions. This activity was valuable because I got to learn and critically think about how circuits should be wired and introduced to more programming. The first circuit I built and programmed was to read the value of a photoresistor and create an output with an LED. A photoresistor measures the amount of light. This means the more light the photoresistor measures, the brighter the LED will get. To do this, I set up two separate circuits. In the first one, the Arduino measures the value of the photoresistor with a resistor in series. The second creates another circuit with a separate pin as an output. I also coded a serial function to write in text what the value of the photoresistor was. I mapped the values to be between 0-255 so we can get precise adjustments of the LED. The second circuit was slightly more complicated. It was a similar setup except there were two inputs and two outputs. I used ...

AT219 Arduino Uno Programming (Lab 4)

Image
Before this lab, I assembled my Arduino board by soldering the components via online instructions. Once the Arduino board was complete, I plugged it into my computer via a USB-C cable. From here we were able to write code to the Arduino. Hello World pt 1 The first thing I coded was for the Arduino board to print "Hello World" on the serial monitor. I also added comments to explain what each line did. The code for this is shown below. Hello World pt 2 The second thing we coded for the Arduino was to print "Hello World!" on a loop, printing on a new line every time. This utilized the "println" command so it would print on a new line. Blink I then built a circuit onto the Arduino using a breadboard, wire, LED light, and a resistor. The goal was to program the Arduino to make the LED light blink in a SOS pattern. This is three short blinks, three long blinks, and then three short blinks again. We can control when the LED turns on or off by controlling the volt...