Digital Input & Output, Analog Input

In ITP, Physical Computing

We’ve now had two physical computing classes and I’m starting to feel a bit more comfortable with some of the basic concepts surrounding the actual breadboard and programming the Arduino. Here I’ve connected a digital input circuit and a digital output circuit to my microcontroller, and programmed it’s behavior using the Arduino IDE. In separate lab,  I also connected a variable resistor to a microcontroller and read it as an analog input.


Basic digital input and output to microcontroller

For a step by step walkthrough, please refer to Tom Igoe’s lab for Digital Input and Output on the Physical Computing site. The end product is a system where the red LED is lit up when the button is in the open state and the yellow LED is lit up when the button is in the closed state (when I press it).


analog input – variable resistor

You can use analog input as a variable resistor to interact with the physical world and go beyond logging 1s or 0s. Variable resistors allow you to gauge variance in action or the state of something. In this example, I use a potentiometer to control and LED. One thing I noticed was that the Serial Monitor in the Arduino IDE was reading the incrementation of the potentiometer properly, however, I was not seeing any dimming effect on the LED. It’s after a conversation with my classmate Matt that I realized that it’s because the Arduino takes the analog values and translates it into a digital output (1 or 0). Therefore, the light was either on of off.

Submit a comment