1 / 18

the LIVING room

the LIVING room. SITE: 2 SPACES…. …SEPARATED BY A WALL. PROGRAM: A PASSAGE THAT DIS/CONNECTS 2 SPACES. LIGHT SENSOR A. LIGHT SENSOR B. MONITORING THE HEALTH OF THE ORGANISM. AIR MOVEMENT. SETUP. //pin 11,10,9,6,5,3 can be used for Analog output //Draft01 int avrageB =0;

nedaa
Download Presentation

the LIVING room

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. the LIVING room

  2. SITE: 2 SPACES…

  3. …SEPARATED BY A WALL

  4. PROGRAM:A PASSAGE THAT DIS/CONNECTS 2 SPACES LIGHT SENSOR A LIGHT SENSOR B

  5. MONITORING THE HEALTH OF THE ORGANISM AIR MOVEMENT

  6. SETUP //pin 11,10,9,6,5,3 can be used for Analog output //Draft01 intavrageB=0; intavrageA=0; void setup(){ Serial.begin(9600); //Begining Serial Connection intfreqs[] = {1915, 1700, 1519, 1432, 1275, 1136, 1014, 956}; pinMode(13, OUTPUT);// Specify Arduino Pin number and output/input mode pinMode(12, OUTPUT); // Specify Arduino Pin number and output/input mode pinMode(11, OUTPUT); // Specify Arduino Pin number and output/input mode pinMode(10, OUTPUT); // Specify Arduino Pin number and output/input mode pinMode(9, OUTPUT); // Specify Arduino Pin number and output/input mode pinMode(6, OUTPUT); // Specify Arduino Pin number and output/input mode pinMode(5, OUTPUT); // Specify Arduino Pin number and output/input mode pinMode(8, OUTPUT); // Specify Arduino Pin number and output/input mode pinMode(2, OUTPUT); // Specify Arduino Pin number and output/input mode pinMode(4, INPUT); // Specify Arduino Pin number and output/input mode pinMode(0,INPUT); // Specify Arduino Pin number and output/input mode

  7. CALIBRATING for (inti=0; i<20; i++){ avrageA=avrageA+analogRead(4); } avrageA=avrageA/20; for (inti=0; i<20; i++){ avrageB=avrageB+analogRead(0); } avrageB=avrageB/20; Serial.println("System Ready!"); }

  8. …CONTINUED void loop(){ intinA = analogRead(4);// Reading Sensed data from Arduino intinB = analogRead(0);// Reading Sensed data from Arduino //Serial.println(inA);// Writing Sensed Data to Serial Port //Serial.println(inB);// Writing Sensed Data to Serial Port //Serial.println("....."); //delay(1000);

  9. LIGHT SENSOR B LIGHT SENSOR A

  10. if(inA>avrageA/2 && inB>avrageB/2) { Serial.println("A is not Covered and B is not Covered"); analogWrite(11, 255); // sending Analog output 255 analogWrite(10, 100); // sending Analog output 200 analogWrite(9, 5); // sending Analog output 150 analogWrite(6, 0); // sending Analog output 100 analogWrite(5, 0); // sending Analog output 100 analogWrite(3, 0); // sending Analog output 100 delay(300); // Wait for half a second analogWrite(11, 100); // sending Analog output 255 analogWrite(10, 5); // sending Analog output 255 analogWrite(9, 0); // sending Analog output 150 analogWrite(6, 0); // sending Analog output 100 analogWrite(5, 0); // sending Analog output 100 analogWrite(3, 255); // sending Analog output 100 delay(300); // Wait for half a second analogWrite(11, 5); // sending Analog output 255 analogWrite(10, 0); // sending Analog output 255 analogWrite(9, 0); // sending Analog output 150 analogWrite(6, 0); // sending Analog output 100 analogWrite(5, 255); // sending Analog output 100 analogWrite(3, 100); // sending Analog output 100 delay(300); digitalWrite(12,HIGH); delay(200); // Wait for half a second digitalWrite(12,LOW); delay(300); // Wait for half a second analogWrite(11, 0); // Sending Analog output 150 analogWrite(10, 0); // Sending Analog output 150 analogWrite(9, 0); // sending Analog output 150 analogWrite(6, 255); // sending Analog output 100 analogWrite(5, 100); // sending Analog output 100 analogWrite(3, 5); // sending Analog output 100 delay(300); // Wait for half a second analogWrite(11, 0); // Sending Analog output 50 analogWrite(10, 0); // Sending Analog output 150 analogWrite(9, 255); // sending Analog output 150 analogWrite(6, 100); // sending Analog output 100 analogWrite(5, 5); // sending Analog output 100 analogWrite(3, 0); // sending Analog output 100 delay(300); // Wait for half a second analogWrite(11, 0); // sending analog output 0 analogWrite(10, 255); // sending analog output 0 analogWrite(9, 100); // sending Analog output 150 analogWrite(6, 5); // sending Analog output 100 analogWrite(5, 0); // sending Analog output 100 analogWrite(3, 0); // sending Analog output 100 delay(300); digitalWrite(2,HIGH); delay(200); // Wait for half a second digitalWrite(2,LOW);

  11. LIGHT SENSOR B LIGHT SENSOR A

  12. if(inA<avrageA/2 && inB>avrageB/2) { Serial.println("A is Covered and B is not Covered"); analogWrite(11, 255); // sending Analog output 255 analogWrite(10, 0); // sending Analog output 200 analogWrite(9, 0); // sending Analog output 150 analogWrite(6, 0); // sending Analog output 100 analogWrite(5, 0); // sending Analog output 100 analogWrite(3, 10); // sending Analog output 100 delay(300); // Wait for half a second analogWrite(11, 10); // sending Analog output 255 analogWrite(10, 0); // sending Analog output 255 analogWrite(9, 0); // sending Analog output 150 analogWrite(6, 0); // sending Analog output 100 analogWrite(5, 0); // sending Analog output 100 analogWrite(3, 255); // sending Analog output 100 delay(300); // Wait for half a second analogWrite(11, 0); // sending Analog output 255 analogWrite(10, 0); // sending Analog output 255 analogWrite(9, 0); // sending Analog output 150 analogWrite(6, 0); // sending Analog output 100 analogWrite(5, 255); // sending Analog output 100 analogWrite(3, 10); // sending Analog output 100 delay(300); digitalWrite(12,HIGH); delay(200); // Wait for half a second digitalWrite(12,LOW); // Wait for half a second analogWrite(11, 0); // Sending Analog output 150 analogWrite(10, 0); // Sending Analog output 150 analogWrite(9, 0); // sending Analog output 150 analogWrite(6, 0); // sending Analog output 100 analogWrite(5, 0); // sending Analog output 100 analogWrite(3, 255); // sending Analog output 100 delay(300); // Wait for half a second }

  13. LIGHT SENSOR B LIGHT SENSOR A

  14. if(inA>avrageA/2 && inB<avrageB/2) { Serial.println("A is not Covered and B is Covered"); analogWrite(11, 0); // sending Analog output 255 analogWrite(10, 255); // sending Analog output 200 analogWrite(9, 10); // sending Analog output 150 analogWrite(6, 0); // sending Analog output 100 analogWrite(5, 0); // sending Analog output 100 analogWrite(3, 0); // sending Analog output 100 delay(300); // Wait for half a second analogWrite(11, 0); // sending Analog output 255 analogWrite(10, 10); // sending Analog output 255 analogWrite(9,255); // sending Analog output 150 analogWrite(6, 0); // sending Analog output 100 analogWrite(5, 0); // sending Analog output 100 analogWrite(3, 0); // sending Analog output 100 delay(300); // Wait for half a second analogWrite(11, 0); // sending Analog output 255 analogWrite(10, 0); // sending Analog output 255 analogWrite(9, 10); // sending Analog output 150 analogWrite(6, 255); // sending Analog output 100 analogWrite(5, 0); // sending Analog output 100 analogWrite(3, 0); // sending Analog output 100 delay(300); // Wait for half a second digitalWrite(2,HIGH); delay(200); // Wait for half a second digitalWrite(2,LOW); analogWrite(11, 0); // Sending Analog output 150 analogWrite(9, 255); // sending Analog output 150 analogWrite(6, 0); // sending Analog output 100 analogWrite(5, 0); // sending Analog output 100 analogWrite(3, 0); // sending Analog output 100 delay(300); // Wait for half a second }

  15. LIGHT SENSOR B LIGHT SENSOR A

  16. CONSIDER… GAINING AWARENESS OF THE BREATHING OF A SPACE

  17. SITE: 2 SPACES…

  18. …SEPARATED BY A WALL

More Related