From ea0b5ade244aaf40d43ca2027688781bb50b813d Mon Sep 17 00:00:00 2001 From: monibu1548 Date: Mon, 28 Sep 2015 19:10:30 +0900 Subject: [PATCH] web finish --- ... \354\202\254\353\263\270 2015-09-13).ino" | Bin 0 -> 4096 bytes ArduinoActuator/._ArduinoActuator.ino | Bin 0 -> 4096 bytes ArduinoActuator/ArduinoActuator.ino | 11 +- .../src/Arduino/._ArduinoManager.class | Bin 0 -> 4096 bytes .../src/Arduino/._ArduinoManager.java | Bin 0 -> 4096 bytes WebMonitering/JS/loadData.js | 44 +++-- WebMonitering/index.html | 171 +++++++++++------- 7 files changed, 144 insertions(+), 82 deletions(-) create mode 100644 "ArduinoActuator/._ArduinoActuator (JingyuJung\354\235\230 \354\266\251\353\217\214\353\220\234 \354\202\254\353\263\270 2015-09-13).ino" create mode 100644 ArduinoActuator/._ArduinoActuator.ino create mode 100644 RaspO2Ogateway/src/Arduino/._ArduinoManager.class create mode 100644 RaspO2Ogateway/src/Arduino/._ArduinoManager.java diff --git "a/ArduinoActuator/._ArduinoActuator (JingyuJung\354\235\230 \354\266\251\353\217\214\353\220\234 \354\202\254\353\263\270 2015-09-13).ino" "b/ArduinoActuator/._ArduinoActuator (JingyuJung\354\235\230 \354\266\251\353\217\214\353\220\234 \354\202\254\353\263\270 2015-09-13).ino" new file mode 100644 index 0000000000000000000000000000000000000000..64cd62e35d7570e0fd6dc9605c078041e35bc24b GIT binary patch literal 4096 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDJkFz{^v(m+1nBL)UWIUt(=a103v0xDsI z=wO%wWCx>Z0m{L|#gp@M^-_xR3zG6H^b$)-iZYW*OHzx03M%HT4)fAHrSEZSeTV<) zGoELCI?tc<_d64~DQHF5DPNy+C(bZ;s!p3C(%2d#Ltr!nMnhmU1V%$(Gz3ONU^E0qLtr!n zMnhmYg#f6t3Bq6?7m|@#tWcC%oL^d$oT`wPUzDwonOBmUSCW~Zmza}NsgRSJR-%xU ZlbDwc>$Vqox1Ojhs@R)|o50+1L3ClDJkFz{^v(m+1nBL)UWIUt(=a103v0xDsI z=wO%wWCx>Z0m{L|#gp@M^-_xR3zG6H^b$)-iZYW*OHzx03M%HT4)fAHrSEZSeTV<) zGoELCI?tc<_d64~DQHF5DPNy+C(bZ;s!p3C(%2d#%;!;ijgn2AVTQxuYR48UmvsFd71*Aut*OqaiRF0;3@?8Umvs zFd72GDFi^BO%MhHxsZ&^VuhmA;{4L0 literal 0 HcmV?d00001 diff --git a/ArduinoActuator/ArduinoActuator.ino b/ArduinoActuator/ArduinoActuator.ino index f264406..a45d7b4 100755 --- a/ArduinoActuator/ArduinoActuator.ino +++ b/ArduinoActuator/ArduinoActuator.ino @@ -69,6 +69,7 @@ void setup(){ pinMode(lightPin, OUTPUT); pinMode(airconPin, OUTPUT); + digitalWrite(airconPin, HIGH); } void loop(){ @@ -172,7 +173,7 @@ void loop(){ } - delay(1000); + delay(500); } void OnLight(){ @@ -185,11 +186,11 @@ void OffLight(){ } void OnAircon(){ // Pin 12 -> Aircon - digitalWrite(airconPin, HIGH); + digitalWrite(airconPin, LOW); } void OffAircon(){ // Pin 12 -> Aircon - digitalWrite(airconPin, LOW); + digitalWrite(airconPin, HIGH); } void OnProjector(){ @@ -200,7 +201,7 @@ void OnProjector(){ // Control Servomoter int pos; - for(pos = 0; pos <= 180; pos += 1) // goes from 0 degrees to 180 degrees + for(pos = 0; pos <= 180; pos += 3) // goes from 0 degrees to 180 degrees { // in steps of 1 degree projServo.write(pos); // tell servo to go to position in variable 'pos' delay(15); // waits 15ms for the servo to reach the position @@ -216,7 +217,7 @@ void OffProjector(){ } int pos; - for(pos = 180; pos>=0; pos-=1) // goes from 180 degrees to 0 degrees + for(pos = 180; pos>=0; pos-=3) // goes from 180 degrees to 0 degrees { projServo.write(pos); // tell servo to go to position in variable 'pos' delay(15); // waits 15ms for the servo to reach the position diff --git a/RaspO2Ogateway/src/Arduino/._ArduinoManager.class b/RaspO2Ogateway/src/Arduino/._ArduinoManager.class new file mode 100644 index 0000000000000000000000000000000000000000..de4c0efee4ca213bd1b3de3700bc905efdcd0eb4 GIT binary patch literal 4096 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDJkFz{^v(m+1nBL)UWIUt(=a103v0xDsI z=wO%wWCx>Z0m{L|#gp@M^-_xR3zG6H^b$)-iZYW*OHzx03M%HT4)fAHrSEZSeTV<) zGoELCI?tc<_d64~DQHF5DPNy+C(bZ;s!p3C(%2d#1t!-gl|)A`y>%;!;p%r;DKuw{az{g8Gz3ONU^E0qLtr!nMnhmU1V%$(Gz3ON zU^E1VQwV@Mn;;AZav>R+#R^5K#rdU0$*Bry`9;|ZnRz9tc_o?od5JkWl?pkjX(b9t ZIf;4Mz`ih4*N~=A{SWtw41?VN{{X7#Pq_d9 literal 0 HcmV?d00001 diff --git a/RaspO2Ogateway/src/Arduino/._ArduinoManager.java b/RaspO2Ogateway/src/Arduino/._ArduinoManager.java new file mode 100644 index 0000000000000000000000000000000000000000..eaa662ba4de2aba97a6402decbd2ae31b20384cc GIT binary patch literal 4096 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDJkFz{^v(m+1nBL)UWIUt(=a103v0xDsI z=wO%wWCx>Z0m{L|#gp@M^-_xR3zG6H^b$)-iZYW*OHzx03M%HT4)fAHrSEZSeTV<) zGoELCI?tc<_d64~DQHF5DPNy+C(bZ;s!p3C(%2d#8)E)3|D{3I-xmZlsg&%qaiRF0;3@?8UmvsFd71*Aut*OqaiRF z0;3@?oI(K9*#u!QkPFGkELJE=EzU13N={Ws%P-1S$jmEA%`3^w&r8h7sZ_{GO)F7I a%1O-22KI%ax`s4`>VLRbWEkZB{|5kE2vOny literal 0 HcmV?d00001 diff --git a/WebMonitering/JS/loadData.js b/WebMonitering/JS/loadData.js index 109074a..e12cc50 100755 --- a/WebMonitering/JS/loadData.js +++ b/WebMonitering/JS/loadData.js @@ -1,25 +1,37 @@ -var tempData101 = $('#temp101'); -var humData101 = $('#hum101'); -var useData101 = $('#user101'); +var Data101 = $('#data101'); -var btnLight101 = $('#btnLight101'); -var btnBeam101 = $('#btnBeam101'); -var btnAircon101 = $('#btnAircon101'); - -var tempData102 = $('#temp102'); -var humData102 = $('#hum102'); -var useData102 = $('#user102'); - -var btnLight102 = $('#btnLight102'); -var btnBeam102 = $('#btnBeam102'); -var btnAircon102 = $('#btnAircon102'); +var Data102 = $('#data102'); var loadingData = function(){ - $.getJSON('http://49.142.11.147:3000/1', function(json){ - tempData101.text(json.temp); + + $.ajax({ + url: "http://growingdever.cafe24.com:3001/1", + type: 'GET', + success: function(res) { + Data101.val(res.temp +" "+res.hum + " " + res.inuse); + }, + error: function(res){ + alert("errer 101"); + console.log(res); + } +}); + + $.ajax({ + url: "http://growingdever.cafe24.com:3001/2", + type: 'GET', + success: function(res) { + Data102.val(res.temp +" "+res.hum + " " + res.inuse); + }, + error: function(res){ + alert("error 102"); + console.log(res); + } }); + + + } diff --git a/WebMonitering/index.html b/WebMonitering/index.html index 11992f2..1b809fc 100755 --- a/WebMonitering/index.html +++ b/WebMonitering/index.html @@ -35,16 +35,23 @@

101 호

- - Loading... - + 온도 + 습도 + 사용유무 +
+ +
+ + + +
+ + +
+
-
- - - -
+

1F

@@ -60,16 +67,22 @@

102 호

- - Loading... - + 온도 + 습도 + 사용유무 +
+ +
+ + + +
+ +
+
-
- - - -
+

1F

@@ -87,16 +100,23 @@

103 호

+ 온도 + 습도 + 사용유무 +
+ +
+ - Loading...
+ + +
+ +
-
- - - -
+

1F

@@ -110,19 +130,23 @@

104 호

- -
+ +
+ 온도 + 습도 + 사용유무 +
+ +
+ - Loading...
- -
- - - -
- + +
+ +
+

1F

@@ -137,17 +161,23 @@

105 호

+ 온도 + 습도 + 사용유무 +
+ +
+ - Loading...
+ + +
+ +
-
- - - -
- +

1F

@@ -162,16 +192,23 @@

106 호

+ 온도 + 습도 + 사용유무 +
+ +
+ - Loading...
+ + +
+ +
-
- - - -
+

1F

@@ -186,17 +223,23 @@

107 호

-
+
+ 온도 + 습도 + 사용유무 +
+ +
+ - Loading... -
+
+ +
+ +
-
- - - -
+

1F

@@ -210,18 +253,24 @@

108 호

- -
+ +
+ 온도 + 습도 + 사용유무 +
+ +
+ - Loading...
-
- - - -
+
+ +
+ +

1F