Physical Computing · Week 2

Lab: Digital Input and Output

Preparing my breadboard + added a digital input: Connected Arduino’s power and ground, then added a pushbutton as a digital input

Adding digital output: Added 2 LEDs as digital outputs (connected to digital pin 3 and 4) (switched the colors of my LEDs midway to match the colors in the lab instructions)

Arduino code + video of digital input and output working:

Arduino Code
Digital Input (Pushbutton) and Output (LEDs) Working

Reflection: I was able to move through this lab fairly smoothly after figuring out what was causing the issues I had for my first week labs. In this lab, my switch was able to control my LEDs and turn them on/off as I press on it and let go. One minor thing that took me a little googling to figure out was that due to the fact that I have the Arduino Nano V3.0 instead of the 33 IOT (as I wasn’t able to find this Arduino in Taiwan), I had to connect to the “Arduino Nano” board instead and install an external plug-in for my serial port to detect. After doing this, I was able to successfully verify and then upload my code.

Lab: Analog Output

Setting up: I started this lab by setting up my bread board and then adding a potentiometer and LED following the instructions in the lab

Arduino code + video of potentiometer working: I was able to run the code and my LED dims up and down accordingly as I turn the knob of my potentiometer

Arduino Code
Analog Input with Potentiometer Working

Incorporating force-sensing resistors: Following the setup instructions in the lab, I placed two force-sensing resistors on my breadboard and wired them to control the light of two respective LEDs. Finding my sensor range, I used the serial monitor and found that the range of my sensor input goes from roughly 0-255 and thus I edited the sensor values of the Arduino code.

Arduino Code with Edited Input Values after Finding my Sensor Range
Analog Input with Force-Sensing Resistor Working

Reflection: I think both labs this week was fairly manageable as I was able to follow the provided instructions and build working circuits. However, I definitely feel that I would need to spend more time on understanding the codes in order to write and generate my own in the future as I don’t barely had any programing experience prior to entering ITP. Also, the phototransistor was out-of-stock at the local store I shopped my parts at. I am still waiting for it to arrive and thus don’t have it in time for this lab. However, I worked on this week’s lab with my partner Sean and was able to work with him on getting his phototransistor to work. Overall, I got a lot more familiar with my parts and building circuits after the first week and also think it’s very helpful to work on the labs together with a partner as we were able to help each other troubleshoot minor problems we ran into and complete the labs fairly successfully.

Question: For the circuit with force-sensing resistors, when I press on one of the resistor, the other LED that it is not controlling also slightly flickers and I am wondering what is causing this and how to fix this issue.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s