As computing becomes more ubiquitous in our objects, designers need to be more aware of how to design meaningful interactions into electronically enhanced objects. At the University of Washington, a class of junior Interaction Design majors is exploring this question. These pages chronicle their efforts.

Saturday, June 13, 2020

Analog Output Experimentation

I had a lot of issues with this experimentation. In the end, the only thing I was able to figure out was having the LED fade constantly and turn off when something was covering the LDR. What I was hoping to do with this project was to have the LDR control the brightness of the LED and then have another button that determines whether or not the LED is on or off.

I'm still trying to figure out this project, but hopefully I learn my mistake soon!


const int ledPin = 9;
const int ldrPin = A0;
int brightness = 0;
int fadeAmount = 5;

void setup() {
  Serial.begin(9600);
  pinMode(ledPin, OUTPUT);
  pinMode(ldrPin, INPUT);
 
}

void loop() {
  int ldrStatus = analogRead(ldrPin);

  if (ldrStatus <= 400) {
    analogWrite(ledPin, brightness);

  // change the brightness for next time through the loop:
  brightness = brightness + fadeAmount;

  // reverse the direction of the fading at the ends of the fade:
  if (brightness <= 0 || brightness >= 255) {
    fadeAmount = -fadeAmount;
  }
  // wait for 30 milliseconds to see the dimming effect
  delay(30);;
  }
  else {
    digitalWrite (ledPin, LOW);
   
  }
}

Capsense Library Experimentation

After following the YouTube video and the Instructables video, I was able to successfully create a capacitive sensor using the Arduino. I was actually surprised by how simple it was. I first tried putting my wire against the metal portion of my scissors before closing my fist over the wire and seeing the serial monitor respond to that. I think that the capacitive sensor is a really useful tool and I plan to try using it in the future.

The code I used was the Capacitive Sensor Sketch example from the Capsense Library.


Final Prank Documentation

Annabel Lee
DES 325 

My computer just shut down and I can't seem to reopen Arduino; I keep getting a popup message that says that the application is not responding and forces me to quit the program. I also tried to use the browser version but still could not connect to my Arduino port. Arduino and I have a love-hate relationship... However, due to the sake of time, I will continue to share what I had in mind and my potential plan. 

Capsense Library

Capacitive Sensing


This was quite interesting as I got to understand the value of capacitive sensing and can recognize the technologies that possibly use this type of sensing. I used a 1M ohm resistor and connected it to my x-acto knife. The serial monitor was still confusing to read because of the unstable grounding but I was able to witness the changes in the readings so I'm happy it was evidently working. 

My code:

#include <CapacitiveSensor.h>

CapacitiveSensor cs_4_2 = CapacitiveSensor(4,2); // 10 megohm resistor between pins 4 & 2, pin 2 is sensor pin, add wire, foil

void setup(){

cs_4_2.set_CS_AutocaL_Millis(0xFFFFFFFF); // turn off autocalibrate on channel 1 - just as an example Serial.begin(9600);

}

void loop(){

long start = millis();

long total1 = cs_4_2.capacitiveSensor(30);

Serial.print(millis() - start); // check on performance in milliseconds

Serial.print("\t"); // tab character for debug window spacing

Serial.println(total1); // print sensor output 1

delay(10); // arbitrary delay to limit data to serial port

}

Knolling a Film Camera


I decided to tear apart a Canon AE-1 film camera. The interesting thing is that a lot of the parts have to do with the processing of light through the lens itself which serves the primary part of the camera. Personally, finding which parts fall under sensor, processing and actuation was a little tough as I didn’t have an object to knoll but finding this teardown image was very helpful. I personally take a lot of film photography (but rely very heavily on my Leica point and shoot) and have never thought of what goes behind my camera. This knolling experience has allowed me to understand my camera better and am able to apply it to my photography.

Analog Output Experimentation

Annabel Lee
DES 325 A
Analog Output Experimentation

Part 1: 

Was able to successfully get the photoresistor to detect a change in light which would directly affect the dimness of the LED. The change in dimness was extremely subtle. I decided to increase the resistance to make the light more sensitive to the photoresistor. From a 220 ohm resistor, I changed it to a 2K ohm resistor and it made a significant difference. I was even able to see the delay more clearly with the new resistor. See below:



Part 2: LED controlled by Joystick

Well, the original plan was to experiment with the joystick to control the LED lights and then try using photoresistors to replace the joystick to turn on certain lights as to mimic current game controllers that use sensors to control movement and the display. Unfortunately... I could not even get the arduino to really work. It is difficult without much guidance even though I had a tutorial. Hopefully I learn my mistake soon. 
Add caption
int UD = 0;

int LR = 0;

/* Arduino Micro output pins*/

int DWN = 13;

int UP = 12;

int LEFT = 11;

int RT = 10;

/*Arduino Micro Input Pins */

int IUP=A0;

int ILR=A1;

int MID = 10; // 10 mid point delta arduino, use 4 for attiny

int LRMID = 0;

int UPMID = 0;

void setup(){

pinMode(DWN, OUTPUT);

pinMode(UP, OUTPUT);

pinMode(LEFT, OUTPUT);

pinMode(RT, OUTPUT);

digitalWrite(DWN, HIGH);

digitalWrite(UP, HIGH);

digitalWrite(LEFT, HIGH);

digitalWrite(RT, HIGH);

//calabrate center

LRMID = analogRead(ILR);

UPMID = analogRead(IUP); }

void loop(){

UD = analogRead(IUP);

LR = analogRead(ILR);

// UP-DOWN

if(UD < UPMID - MID){

digitalWrite(DWN, HIGH);

}else{

digitalWrite(DWN, LOW);

}

if(UD > UPMID + MID)

{ digitalWrite(UP, HIGH);

}else{

digitalWrite(UP, LOW);

} // LEFT-RIGHT

if(LR < LRMID - MID){

digitalWrite(LEFT, HIGH);

}else{

digitalWrite(LEFT, LOW);

}

if(LR > LRMID + MID){

digitalWrite(RT, HIGH);

}else{

digitalWrite(RT, LOW);

}

delay(400);
}




Friday, June 12, 2020

SPA Project: Humidity/Temperature Detector




As I was exploring different components of Arduino, I thought it would be interesting if I could build something that would help me get a sense of the weather. I wanted to use the DHT11 sensor to detect the humidity and temperature of the day so I can figure out what to wear. 

Problem Space: Find a better sense of what to wear depending on the humidity and temperature of the day! 

Following a tutorial from https://how2electronics.com/interfacing-dht11-humdity-temperature-sensor-with-arduino/. I was able to get my LCD to turn on but had a difficult time figuring out how to get any digital display to show up. Many error messages were popping up. 

Unfortunately, I could not figure out how to get my LCD display the text that I want... but this is what I have so far and wish to see if anyone else could figure out what I did wrong here.


My code:
#include <dht.h> //downloaded from online
#include <LiquidCrystal.h>

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41

LiquidCrystal lcd(7, 6, 5, 4, 3, );
#define dht_dpin 8
dht DHT;
byte degree[8] =
{
0b00011,
0b00011,
0b00000,
0b00000,
0b00000,
0b00000,
0b00000,
0b00000
};
void setup()
{
lcd.begin(16, 2);
lcd.createChar(1, degree);
lcd.clear();
//lcd.print(” Humidity “);
lcd.setCursor(0,1);
//lcd.print(” Measurement “);
delay(2000);
lcd.clear();
}
void loop()
{
DHT.read11(dht_dpin);
lcd.setCursor(0,0);
//lcd.print(“Humidity:”);
lcd.print(DHT.humidity); // printing Humidity on LCD
//lcd.print(” %”);
lcd.setCursor(0,1);
//lcd.print(“Temp:”);
lcd.print(DHT.temperature); // Printing temperature on LCD
lcd.write(1);
//lcd.print(“C”);
delay(500);
}
}
 Error messages: 
Arduino: 1.8.12 (Mac OS X), Board: "Arduino Uno"

humidity_sensor:6:1: error: expected unqualified-id before numeric constant
 2
 ^
/Users/annabel/Documents/Arduino/humidity_sensor/humidity_sensor.ino: In function 'void setup()':
humidity_sensor:63:1: error: 'lcd' was not declared in this scope
 lcd.begin(16, 2);
 ^~~
/Users/annabel/Documents/Arduino/humidity_sensor/humidity_sensor.ino: In function 'void loop()':
humidity_sensor:75:1: error: 'lcd' was not declared in this scope
 lcd.setCursor(0,0);
 ^~~
/Users/annabel/Documents/Arduino/humidity_sensor/humidity_sensor.ino: At global scope:
humidity_sensor:86:1: error: expected declaration before '}' token
 }
 ^
exit status 1
expected unqualified-id before numeric constant

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.