5-in-5_Day1_Unicorn Striking through the Grass

“n-in-n”, a tradition around ITP, where students complete n project in n day, over a certain number of days.

In this case, 5 days, 5 projects. Besides participating bunch of workshops held by amazing 2nd-years, for my Day1 project, I was thinking about doing StormLighter with this tutorial, but cut it off because of the shortage of materials. So I moved on to other new stuff: Capacity Sensing Library, which I always wanted to try, and RGB Led, because why not. For few hours here’s my rainbow-ish project result.

wires

unicorn_circuits

code

#include <CapacitiveSensor.h>

int redPin = 11;
int greenPin = 10;
int bluePin = 9;

int sendPin = 4;
int RreceivePin = 2;
int GreceivePin = 6;
int BreceivePin = 8;

CapacitiveSensor   cs_4_2 = CapacitiveSensor(4,2);
CapacitiveSensor   cs_4_6 = CapacitiveSensor(4,6);
CapacitiveSensor   cs_4_8 = CapacitiveSensor(4,8);

void setup()
{
  pinMode(redPin, OUTPUT);
  pinMode(greenPin, OUTPUT);
  pinMode(bluePin, OUTPUT);

  Serial.begin(9600);
}

void loop()
{
  long start = millis();
  long total1 =  cs_4_2.capacitiveSensor(30);
  long total2 =  cs_4_6.capacitiveSensor(30);
  long total3 =  cs_4_8.capacitiveSensor(30);

  Serial.print(millis() - start);       
  Serial.print("t");                   
  Serial.print(total1);                 
  Serial.print("t");
  Serial.print(total2);
  Serial.print("t");
  Serial.println(total3);

  int colorR = (int)map(total1, 0, 100, 0, 255);
  int colorG = (int)map(total2, 0, 100, 0, 255);
  int colorB = (int)map(total3, 0, 100, 0, 255);

  setColor(colorR, colorG, colorB);

  delay(50);
}

void setColor(int red, int green, int blue)
{
  analogWrite(redPin, red);
  analogWrite(greenPin, green);
  analogWrite(bluePin, blue);  
}

references: 1, 2

Hacking flashlight for party!

Collaborated w/ Ziv, Alex, Jorge, and Kristina.

Long long time ago(Oct, 2013), Ziv came out of an idea for the photo booth of ITP Halloween party–> Photoboo, which is using strong light to frighten whoever walk in and taking pictures of them. Big success.

I was responsible for the light part and came out of an idea that just using the external flashlight kit of Canon 5D. With this reference, flashlight worked like a charm with a simple button(P.s. We used transistor instead of optoisolator).

Connected to the complicated Max/MSP patch Alex made, the flashlight triggered once infrared sensor detecting people approaching.

Here’s the simple circuit.

flashlight_hack

And here’s the code for Arduino.

#define CAMERA_FLASH_PIN 8
#define BUTTOM_PIN 2

void setup()
{
  pinMode(BUTTOM_PIN, INPUT);
  pinMode(CAMERA_FLASH_PIN, OUTPUT);
  digitalWrite(CAMERA_FLASH_PIN, LOW);
  Serial.begin(9600); // open serial
  Serial.println("Press the button to trigger the flash");
}

void loop()
{
  if (digitalRead(BUTTOM_PIN) == HIGH) {
    digitalWrite(CAMERA_FLASH_PIN, HIGH);
    delay(100);
    digitalWrite(CAMERA_FLASH_PIN, LOW);
  }
  else {
    digitalWrite(CAMERA_FLASH_PIN, LOW);

    Serial.println("Press the button to trigger the flash");
  }
}

 

And…. I also designed some frames for the Photoboo!

 

Happy time 😀

Quick notes after Winter Show 2013

Dope Ropes

doperope

Feedback

  • “Is it NIME? Just PComp? Wow good job guys, amazing!”
  • “What does it do?”
  • “Wow I like that, check this out, this is my favorite!”
  • “Why do you choose those sounds?”
  • advices for the ropes attachment
  • very satisfying when pulling
  • bell instrument
  • “Are they sex tool ropes?”
  • pretty on and off switch LED
  • “LED is fun.”
  • Are you a musician?
  • Can you compose song with this?
  • Using headphones for this.
  • Speakers can be located separately for each set.
  • People are afraid they’re going to pull it down; afraid to pull in the beginning

Aftershow Notes

  • too high to adjust, all the wires need to be glued to be stable
  • xbee data sending –> glitch!
  • pulling instrument –> potential, because it’s rare. The only association people have is ringing the bell.
  • people seems more related to recognizable sample sounds
  • pitch changing one needs to be more subtle and gentle
  • Pulling demonstration helps people understand

 

 

Glitchtchtchitch

glitchtchtchitch

Feedback

  • some just pass by
  • some enjoy it, standing for a long time and coming back later
  • people feel more comfortable when I’m not beside the stand
  • watching –> realizing –> smiling –> seeing EyesMouthes –> laughing
  • “Ha. Big brother is watching.”
  • “How do you say this title?”  “I see. Sounds like what they look like.”
  • “Fun” “Very interesting”
  • “Hmm”
  • “What should I do?” “How does it work?”
  • “Can I take picture with it?”
  • “Can I record this?”
  • people wave at the camera
  • “It’d be cool if it can detect me smiling”
  • interested in how it works
  • “I want to take this home and put it in my room.”

Aftershow Notes

  • If it’s workable would be more interesting to open more sketches
  • Ideally two computers with 4 projectors!
  • can add more interaction function e.g. detect smile and laugh
  • more knowledge about surveillance and psychology of people’s react with it

PComp_Interaction_Rethink

7 weeks past, I’ve seen a lot of interaction thought through a lot of ideas for midterm project. Personally, it strengthens my favor for the tangible interaction. It doesn’t necessarily need to be touched to activate but it’s really a satisfying moment to be able to be touched, if users want to. For me, touching strengthen the level of interaction, since touching make workpiece more lively and real. More approachable. And that also strengthen my desire to make some low-fi thing! The original, unpolished appearing can let users focus on the content, and the exposed, seeable technology(e.g. motor, mechanical and physical stuff) can surprise users with familiar things doing unfamiliar things, and might even catalyze users to have new ideas to live the life.

About whether interaction to be implicit or explicit, I think it is case by case. Personally, unpredictable and surprise is my thing but some people might find it annoying and uncomfortable. Moreover, measuring the level of implicit is also an important issue. It should still have patterns or certain amount of logic, in that way users can still have the power of control.

PComp_UnoBurnedNO0oo…

Burned my arduino...

Inspired by the crazy servo motor workpiece by David Bowen, I tried to learned controlling DC motor rotating direction with H-bridge through this tutorial but failed to change the direction. The result was either rotated or stopped. Thinking the possibility of my motor might be broken, I borrowed other’s official stater kit’s DC motor, which was smaller than mine, and then things just went wrong…

The motor spun so fast and Uno became kind of warm. I pulled out the power supply but it was too late. I couldn’t upload any sketches anymore. Even unplugged all the wires and run the Example sketch…. NOOO000ooo….

Too frustrated to take a pic of my breadboard. Should remember to avoid emotions stopping you document next time…

PComp_5_Don’t Touch My Cookie!

Fantasy kind of comes to live guys!

After the PComp class, I was inspired to do more about how the communications between Arduino and Processing. I want them to be more instinct, more meaningful, and more related to each other, not just switching on and off. And stay away using MOUSE to control/adjust my work all the time. My works should have their own behaviors patterns, without others tell them what to do. (kind of like users can only have small control/impact on them ;))

So I came out of an idea to control the chocolate spiders amount of my this week’s ICM homework! Since my intention of this project is scaring away people who try to eat it, why not building the interaction based on that? The more you come closer to the cookie(I use photosensor), the more chocolate spiders will come out alive. And the button at Top Left corner will turn red to warn!PComp_cookie_spider

And it worked! 😀 The contends and the behavior matched perfectly. First time! Exciting!! And my circuit looked simple as well.

2013-10-09 14.33.07

Come out a good/crazy idea, and then execute it well in the most instinct and simplest way. It’s my goal of life now.

Below are my To-Do-Lists that inspired through today’s PComp class:

  1. Change velocity, acceleration, changes, instead of just position and on-and-off, so when there’s no input(no one using it), animation still runs.
  2. Different modes with different compositions of inputs. (e.g. Mode A: button 1; Mode B: button 1+2 …)
  3. Let users feel they control something in an abstract way. (Wwwwooo complicated…)

PComp_4_MusicInstrument

In PComp class Billy and I make a Music Instrument that can adjust the pitch by pressing and tapping. Check this out!

 

#include "pitches.h"

int lastButtonState = LOW;
boolean switchIsOn = false;

const int threshold = 10;
const int speakerPinNum = 8;
const int noteDuration = 20;

const int potenPinNum = 5;
int volumeAnalogValue = 0;
int volume = 0;

const int potPinNum = 2;
float saveNote;

int note[] = {
  NOTE_C4, NOTE_E4};

void setup() {
  Serial.begin(9600);
  saveNote = note[1];

}

void loop() {

  int buttonState = digitalRead(2);

  if (buttonState != lastButtonState) {
    if (buttonState == HIGH) {
      switchIsOn = !switchIsOn;
    }
  }

  lastButtonState = buttonState;

  if (switchIsOn == true) {

    int pitchRead = analogRead(0);
    int noteRead = analogRead(1);

    float pitch = map(pitchRead, 0, 950, 0, 100);

    if (pitch > 0) {
      note[1] += pitch;
    } 
    else {
      note[1] = saveNote;
    }

    Serial.print(pitch);
    Serial.print(" ");
    Serial.println(noteRead);

    if(noteRead > threshold) {
      tone(speakerPinNum, note[1], noteDuration);
    } 
  }
}

As for my review for this on Sunday, I made a basic music kit that you can control on/off, volumes, pitches(higher/lower), and tempo. But since it’s a single-note playing machine instead of templates/clip of music triggered one, it makes no difference with the changes of tempo.

MusicPractive

And thanks to almighty Moon! I got the idea of setting button-“released” as the command to adjust pitches, so that pitches won’t go crazy because of the unmeasurable amount/time of button-“pressed” when you press the button. Thank you Moon 😀

What I want to do next–

  1. make chords (office hour w/ resident booked!)
  2. play continuous clips instead of single notes
  3. be creative! not just pressing buttons… not interesting at all… go go go!

And here’s the code.

#include "pitches.h"

int lastButtonState = LOW;
boolean switchIsOn = false;

const int threshold = 600;
const int speakerPinNum = 8;
const int switchPinNum = 2;
const int higherPitchPinNum = 4;
const int lowerPitchPinNum = 3;

int pre_higherPitchRead = 0;
int pre_lowerPitchRead = 0;

const int tempoPinNum = 0;
const int noteGPinNum = 1;
const int noteEPinNum = 2;
const int noteCPinNum = 3;

const int noteDuration = 20;

int saveNote[3];
int note[] = {NOTE_C4, NOTE_E4, NOTE_G4};

void setup() {
  Serial.begin(9600);

  // save the original notes
  for (int i=0; i<3; i++) {
    saveNote[i] = note[i];
  }
}

void loop() {

  // on-off switch setting
  int buttonState = digitalRead(switchPinNum);
  if (buttonState != lastButtonState) {
    if (buttonState == HIGH) {
      switchIsOn = !switchIsOn;
    }
  }
  lastButtonState = buttonState;

  // read different notes
  int noteCRead = analogRead(noteCPinNum);
  int noteERead = analogRead(noteEPinNum);
  int noteGRead = analogRead(noteGPinNum);

  // set up duration of notes
  int tempoRead = analogRead(tempoPinNum);
  int tempo = map(tempoRead, 0, 1023, 5, 100);

  // press buttons to make notes go higher/lower 
  int higherPitchRead = digitalRead(higherPitchPinNum);
  int lowerPitchRead = digitalRead(lowerPitchPinNum);

  // when switch is on
  if (switchIsOn == true) {

    Serial.print(tempo);
    Serial.print("  ");

    // make notes go higher or lower
    for (int i=0; i<3; i++) {
      if (higherPitchRead == LOW && pre_higherPitchRead == HIGH) {
        note[i] *= 2;
      }
     if (lowerPitchRead == LOW && pre_lowerPitchRead == HIGH) {
        note[i] /= 2;
      }
      note[0] = constrain(note[0], 32, 4192);
      note[1] = constrain(note[1], 41, 5280);
      note[2] = constrain(note[2], 49, 6272);
    }

    // make sounds!
    if(noteCRead < threshold && noteERead < threshold && noteGRead < threshold) {
      for (int i=0; i<3; i++) {
        tone(speakerPinNum, note[i], tempo);
      }
    } else if(noteCRead < threshold && noteERead < threshold) {
      tone(speakerPinNum, note[0], tempo);
      tone(speakerPinNum, note[1], tempo);
    } else if(noteCRead < threshold && noteGRead < threshold) {
      tone(speakerPinNum, note[0], tempo);
      tone(speakerPinNum, note[2], tempo);
    } else if(noteGRead < threshold && noteERead < threshold) {
      tone(speakerPinNum, note[2], tempo);
      tone(speakerPinNum, note[3], tempo);
    } else if(noteCRead < threshold) {
      tone(speakerPinNum, note[0], tempo);
    } else if(noteERead < threshold) {
      tone(speakerPinNum, note[1], tempo);
    } else if(noteGRead < threshold) {
      tone(speakerPinNum, note[2], tempo);
    }

    Serial.print(note[0]);
    Serial.print(" ");
    Serial.print(note[1]);
    Serial.print(" ");
    Serial.print(note[2]);
    Serial.print(" ");
    Serial.println(" ");

  } else {
    for (int i=0; i<3; i++) {      // when swtich-off
      note[i] = saveNote[i];       // restore the original notes
    }
  }

  // remember the previouse higher/lower pitch buttons status
  pre_higherPitchRead = higherPitchRead;
  pre_lowerPitchRead = lowerPitchRead;
}

inspiration_Nick Yulamn

Acoustic Drum Machine_Nick Yulman(( click me to see magic ))

Reading through the reading of PComp and found this ITP alum guy doing amazing stuff with servomotor and solenoid to make an elegant drum set! So artistic done with small drum from Borneo and snail shells! That’s exactly what I want to do, delicate stuff with low-fi appearing. Simply blown my mind. And this work was done in ITP during 2010 I guess.

UNBELIEVABLE.

Inspired at the same time. Thank you(who?) so much to let me become part of ITP. Thank you(who?).