My new concept is making a device to express how noise affect our inner world. The container is divided into two parts. One stand for our inner wold while the other one means the outside world. Since people can hardly concentrate on both the inner world and the outside world, they have to struggle for more space. Once the outside part got more room, it means the inner part has lost some.
When people stay in a noisy environment, they can hardly focus on their thought. Instead of thinking in their mind, they will pay more attention what is happening around. So I try to make the two parts of room available, and could change with the volume of sound.
To get the volume I used a sound sensor. And I used two servos to get a border, which divided the container into two parts, moving with the change of environment. To make the loudness of sound more visible, I use two fans, which could also map their speed with noisy environment. There are small feathers inside the container, so that they will fly in the container while it is noisy outside.
#include <Servo.h>
int sensor1=11;
int sensor2 =10;
int sensor3 =12;
int pos1=0;
int pos2;
int sensor = A5;
int loudness;
Servo myservo1;
Servo myservo2;
void setup(){
pinMode(sensor1,OUTPUT);
pinMode(sensor2,OUTPUT);
pinMode(sensor3,OUTPUT);
Serial.begin(9600);
pinMode(sensor,INPUT);
myservo1.attach(6);
myservo2.attach(9);
}
void loop(){
loudness = analogRead(sensor);
loudness = loudness -500;
if(loudness < 0){
loudness = 0-loudness;
}
if (loudness >=430){
analogWrite(sensor1,255);
analogWrite(sensor2,255);
digitalWrite(sensor3,HIGH);
if(pos1 < 75){
pos1++;
delay(15);
}
}
if (loudness <430){
analogWrite(sensor1,0);
analogWrite(sensor2,0);
digitalWrite(sensor3,LOW);
if(pos1 > 0){
pos1–;
delay(15);
}
}
pos2=180-pos1;
myservo1.write(pos1); // tell servo to go to position in variable ‘pos’
myservo2.write(pos2);
Serial.println(loudness);
}