Recitation 2: Arduino Basics by Ian (You Xu)

In this week’s recitation, we created three circuits and used the reference code to run the circuit.

Circuit 1:

Following the instruction, we quickly built the circuit by linking a LED and a resistor to the Arduino.

We copied the code and made the LED blink successfully. Since I have experience coding Python, it’s easy for me to understand how the “for” and “if” causes work in the code.

Circuit 2:

The instruction for building the circuit is also very straight forward. We did not meet any difficulties while building the circuit.

Circuit 2

When trying to run the code, it says that the system cannot find the file “pitches.h.” Then we realized that we may need to create this file by ourselves as it is explained in the Arduino website. Since I have coding experience, I can roughly tell what the code means. However, since I know nothing about music and tone, I do not know how the melody works. I guess it’s not a big deal. In the end, the program runs successfully.

We also think it may be a good idea if we copy the code to the “void loop” function to make the melody playing repeatedly.

Circuit 3:

The circuit building is a little complex. We spent some time to finish it. Following the instruction, we also finished it quickly. And we change the original button with Arcade button. Following is the actual schematic.

Circuit 3 Schematic

We directly run the code and played the game multiple times.

Circuit 3

Circuit 4:

We are about to challenge circuit 4 with another group. However, we realized that while building the circuit is easy, the coding part may take some time to finish. Since we only have a few minutes left, we did not finish doing circuit 4.

Question 1:

Nowadays, we have already in an environment that is surrounded by computers. We use our phones every day. We take elevators. We wait for traffic lights. All these things matter with computer. The computing abilities of computer make our life easier by interacting with us even we do not notice.

According to Igoe and O’sulliven’s Introduction to Physical Computing, our interaction with computers consists of three parts – “input, output, and processing” (XX). Using circuit 3 as an example. We input our operation by pressing the bottom. The computer tells the result of the game as a response, in the end, regarded as output. As Igoe and O’sulliven say, “input and output are the physical parts of physical computing” that intuitively we can see. The magical part behind it is the process for the computer to do processing for the input and generate the output. This part requires algorithm and programming, which is an essential part of the computer to think like a human.

Works Cited

Igoe and O’sullivan, “Introduction,” Introduction to Physical Computing.

Question 2:

Compare to 220Ω, Higher R enables a lower current to pass the circuit. This can make the circuit works safer.

Question 3:

I would like to make it a digital mirror around a dark room. The color and brightness can show the mood and mentality of the person standing in front of it. Brighter color and higher brightness indicate a more positive state.

Leave a Reply