1.PIR Sensor: Motion detection– The speed of the words

No motion- faster; Motion detected-slower.

2.Ultrasonic Sensor: Distant  detection — The size of the words

Closer- bigger font size; Farther- smaller font size.

3.Internal microphone: Loudness detection — The Sound Wave & The color of the words

Louder- Bigger movement & color in high saturation ; quieter – Smaller movement & color in low saturation.

Advertisements

// CMC 9th floor

20131215_163221

//CMC 4th floor classroom

20131215_170005

// Hall Mul-C

IMGP3290IMGP3297

// AC3 7th floor

IMGP3309 IMGP3305 IMGP3301

//AC2 canteen

IMGP3336

// Under the bridge

IMGP3340 IMGP3342

// SKM park

IMGP3351 IMGP3358IMGP3363 IMGP3367 IMGP3378 IMGP3381 IMGP3383

Processing code

import processing.serial.*;
Serial myPort;

//sound
import ddf.minim.*;
Minim minim;
AudioInput in;
float loudness;

float cm ;
float motiondetect=1;
float x, y, c1, c2, c3, z, s;
float convertString;

String[] fontT = new String[4];
String word;

//park
static String [] wordInput1 = {
“Scary”, “Relaxing”, “Fun”, “Leaves”, “Birds”, “Trees”,
“Wind”, “Lights”, “Play”, “Laughter”, “Romance”,”Raining”
};
//Study Room
static String [] wordInput2 = {
“Assignment”, “Exams”, “tired”, “holiday”, “tomorrow”,
“hungry”, “sleepy”, “boring”, “learning”, “GPA”, “Parents”, “1986176540”
};
//CMC
static String [] wordInput3 = {
“Experiment”, “Art”, “Project”, “Creativity”, “Friends”, “Professors”,
“Pacific Cafe”, “Coffee”, “24Hours”, “Mac”, “Final Cut”, “Animation”, “Editing”,
“Script”, “Programming”, “Photography”, “SAMSON”, “Daniel”
};
//Street
static String [] wordInput4 = {
“Noisy”, “Crossing”, “Hurry”, “LKF”, “Taxi”, “Festival Walk”, “Appointment”,
“Home”, “Waiting”, “Meeting”, “MTR”, “Tomorrow”
};
//canteen
static String [] wordInput5 = {
“Hungry”, “Drink”, “Friends”, “Relaxing”, “Noisy”, “spaghetti”,
“coke”, “fries”, “chatting”, “Noodles”, “Discussion”, “Ramen”, “Chopsticks”
};
PFont f1, f2, f3, f4;
float theta;
int w=1;

void setup() {
size(displayWidth, 800);
colorMode(HSB, 360, 100, 100);
myPort = new Serial(this, Serial.list()[4], 9600);

minim = new Minim(this);
in = minim.getLineIn();

f1 = loadFont(“ArcadeBook-250.vlw”);
f2 = loadFont(“BlackoakStd-48.vlw”);
f3 = loadFont(“ImprintMT-Shadow-48.vlw”);
f4 = loadFont(“LucidaBlackletter-200.vlw”);
}

void serialEvent(Serial myPort) {

String inString = myPort.readStringUntil(‘\n’); // get string until line breaker

if (inString != null) {
inString = trim(inString);

float[] readings = float(split(inString, ‘,’));

if (readings.length >=2)
{
motiondetect = readings[0];
cm = map(readings[1], 0, 100, 0, 30);
}
}

println(“motion= “+motiondetect+” cm=”+cm);
}

void draw() {

String[] fontT = {
“f1”, “f2”, “f3”, “f4”
};

fill(0, 0, 100, 15);
rect(0, 0, width, height);

//sound
line(0, height/2, displayWidth, height/2);
line(0, height/2+2, displayWidth, height/2+2);
line(0, height/2-2, displayWidth, height/2-2);
for (int i = 0; i < in.bufferSize() -1; i++)
{
line(i+150, height/2 + in.mix.get(i)*400, i+151, height/2 + in.mix.get(i+1)*400);
}

stroke(0, 80, 100);
loudness=map(in.mix.level(), 0, 0.5, 0, 100);
println(loudness);

//word generater
if (w==1) word=wordInput1[floor(random(0, wordInput1.length))];
else if (w==2) word=wordInput2[floor(random(0, wordInput2.length))];
else if (w==3)word=wordInput3[floor(random(0, wordInput3.length))];
else if (w==4)word=wordInput4[floor(random(0, wordInput4.length))];
else word=wordInput5[floor(random(0, wordInput5.length))];

textAlign(CENTER);
if (motiondetect == 0) {

fill(c1, c2, c3);

x= random(0, width);
y= random(0, height);
c1= random(0, 360);
c2= random(loudness*3, loudness*4);
c3= random(0, 100);
s= random(0+cm, 230-cm);
z= random(1, 10);

textFont(f1, s);
text(word, x, y, z);

rotate(theta);
theta += 4;
}

if (motiondetect ==1 && frameCount%20==0 ) {

fill(c1, c2, c3);
x= random(0, width);
y= random(0, height);
c1= random(0, 360);
c2= random(loudness, loudness*4);
c3= random(0, 100);
s= random(0+cm, 230-cm);
z= random(1, 10);
textFont(f1, s);
text(word, x, y, z);
}
}

void keyReleased() {
if (key ==’ ‘)
{
if (w<5) w++;
else w=1;
}
}

boolean sketchFullScreen()
{
return true;
}

Arduino code

const int PIRSensor = 8;// PIR sensor
int pingPin = 13;//ultrasonic sensor
int sensorValue = LOW;

void setup() {
pinMode(PIRSensor, INPUT);
Serial.begin(9600);
}

void loop(){
long duration, inches, cm;

pinMode(pingPin, OUTPUT);
digitalWrite(pingPin, LOW);
delayMicroseconds(2);
digitalWrite(pingPin, HIGH);
delayMicroseconds(5);
digitalWrite(pingPin, LOW);

pinMode(pingPin, INPUT);
duration = pulseIn(pingPin, HIGH);

inches = microsecondsToInches(duration);
cm = microsecondsToCentimeters(duration);

sensorValue = digitalRead(PIRSensor);
delay(50);

if (sensorValue == HIGH) {
Serial.print(“1”);
Serial.print(“,”);
Serial.println(cm);

}
if (sensorValue == LOW) {

Serial.print(“0”);
Serial.print(“,”);
Serial.println(cm);

}

}
long microsecondsToInches(long microseconds)
{

return microseconds / 74 / 2;
}

long microsecondsToCentimeters(long microseconds)
{

return microseconds / 29 / 2;
}

cover2

Artist’s statement:
“Die mind”
‘Do you realize what hectic world has brought,
Stay still to hear your running thoughts.’
Every day we are performing some form of actions. In actions we generate fewer thoughts and when we are idle our thoughts become louder and clear. We are caught up with our actions and thoughts inevitably in either circumstance. We believe that it is only in that absolute quite moment that you are able to hear yourself and contemplate your actions and thoughts because they come from all our past and present fulfilled and unfulfilled desires and actions that brought an impression to our mind.

 

53050023 Chen Qianxun

52756279 Diptee Thapa

53074790 Chan Wai Ling

 

Advertisements