This week’s labs were significantly easier to get myself into and fully understand the lesson. Although a large portion of the Arduino coding I don’t fully understand yet, I feel like I retained most of the other information presented.
The first lab involved creating a digital input switch much like the lab last week except this time around we used Arduino to tell the circuit to turn on one of the lights and turn off the other when we press the switch. It is interesting to me to think about the application of these simple interactions. The mechanics behind this simple button is so straightforward yet it can actually provide a lot of different interactions depending on how you wish to program it.
The next lab involved analog inputs which contrary to what the name suggests, simply represent inputs that take a range of values instead of a “yes or no” answer. I found that a bit confusing at first because the word analog usually means relating to a physical quantity and therefore in my mind, the button switch is also a type of analog device. But nonetheless, we linked a potentiometer to the circuit and was able to control the brightness of the LED. Compared to last week’s lab where there was also an exercise on using the potentiometer, we had to program Arduino this time to read the value from the potentiometer as input and then send that information back out to the LED. I think it just sets us up for more complicated interactions down the line.
Next, I simply swapped out the potentiometer with a phototransistor and a force-sensing resistor as the input and was once again able to change the brightness of the LED depending on how much light/force the sensing device was picking up. Once again, these devices all essentially share the same core concept and the difference is simply in what element/property we wish to use as input.
The last lab covered how to read digital and analog inputs’ change in state and value on Arduino. It allow us to visualize the changes in text format and understand the information Arduino is receiving. Initially I found the lab to be quite repetitive but after seeing the logic of the code used to achieve such simple measurements I began to appreciate the complexity of a seemingly straightforward task in Arduino. I especially liked the code that is able to detect the type/length of button presses and I can think of many ways to utilize those inputs in future projects.