Physical Computing Blog 3

Task: Come up with a simple application using digital or analog input and digital output. (Observation is at the bottom of this post.)

I started by using a photocell as the analog input. I utilized the code and instructions from the lab about analog input with the Arduino. I chose to start with a piezo speaker as the digital output. As the amount of light that the photocell is exposed to increases, the tone that the speaker output changes. I mapped the analog input (0 - 1023) to some arbitrary numbers for the speaker (0 - 500). I added a potentiometer to control the volume in which the speaker played tone.


After adding the speaker, I then utilized the code and instructions from the lab about servo motor control with the Arduino. I wanted to utilize both the speaker and the motor. I added the motor to indicate how much light was being received by the photocell and attached a little arrow to show the level. I mapped the analog input (0 - 1023) to numbers for the motor (0 - 400). Below is a schematic diagram of my circuit and a copy of the code utilized for the circuit.

#include <Servo.h>
int photoPin = 0;
int photoRead;
int speakerPin = 4;
int speakerValue;
Servo servoMotor;
int servoPin = 3;
void setup() {
  pinMode(speakerPin, OUTPUT);
void loop() {
  photoRead = analogRead(photoPin);
  speakerValue = map(photoRead, 0, 900, 0, 500);
  tone(speakerPin, speakerValue);
  int servoAngle = map(photoRead, 0, 1023, 0, 400);


I decided to pick an object with relatively low interactivity according to Crawford. I live fairly close to a McDonald’s and this McDonald’s only uses these electronic kiosks. I sat and observed users for around 20-30 minutes. I happened to be there are a very busy time (around 4 o’clock in the late afternoon) and observed multiple people using these kiosks. There also happened to be multiple workers standing around waiting to help the customers with the kiosks. The customers took the most time deciding what they were going to order, I assumed that most customers would come kind of knowing what they would want to order. It also took a long time for people to find items based on their categories and how to customize their order. It seemed to be difficult for most customers to order as quickly as they would normally order with an actual cashier. The payment process was the quickest and easiest part of the entire interaction. On average, the ordering and deciding took around 1 to 3 minutes, while the payment took around 30 seconds, so the total transition took around 1.5 to 3.5 minutes. Overall, I think that the kiosks reduce the number of people and lines because there are multiple kiosks that are always functional. I think that the instructions on how to use the kiosks are clear, but I don’t think many customers want to have to read that much. I think that the organization of the content on the kiosks were odd because it is not similar to the lay out of the normal menu, which would be familiar to many customers.