diff --git a/Codes and More/Hardware Code /nurse_node/client_side.ino b/Codes and More/Hardware Code /nurse_node/client_side.ino new file mode 100644 index 0000000..270f784 --- /dev/null +++ b/Codes and More/Hardware Code /nurse_node/client_side.ino @@ -0,0 +1,29 @@ + +void init_server(){ + String ip_address = WiFi.localIP().toString(); + String concat_info = "ip=" +ip_address+ "&" +node_id ; + char msg[30]; + concat_info.toCharArray(msg, 30); + int statusCode = client.post("/api/init/", msg, &response); +} + +void onpress_side(){ + Serial.println("Button has been pressed!"); + print_screen("Updating the server!"); + + //NEED TO ADD CALL ID ALONG WITH NURSE ID + String str = node_id+"&"+call_id; + char msg[30]; + str.toCharArray(msg, 30); + int statusCode = client.post("/api/nurse/", msg, &response); + //Serial.println(response); + + buzz(); + print_screen("Update done!"); + + +// lcd.clear(); +// lcd_i2c("Received",0,0); +// delay(1000); +// lcd.clear(); +} diff --git a/Codes and More/Hardware Code /nurse_node/lcd_part.ino b/Codes and More/Hardware Code /nurse_node/lcd_part.ino new file mode 100644 index 0000000..becc25f --- /dev/null +++ b/Codes and More/Hardware Code /nurse_node/lcd_part.ino @@ -0,0 +1,24 @@ +//void lcd_init(){ +// Wire.begin(LCD_P1,LCD_P2); +// lcd.begin(); +// lcd_print(); +//} +// +//void lcd_print(){ +// lcd_i2c("Hello To",0,0); +// lcd_i2c("NCS",0,1); +//} +// +//void lcd_i2c(String msg,int start_pos,int col){ +// lcd.setCursor(start_pos, col); +// lcd.print(msg); +//} +// +//void lcd_buzz(){ +// +// lcd.clear(); +// +// String msg = "Calling"; +// lcd_i2c(msg,0,0); +// +//} diff --git a/Codes and More/Hardware Code /nurse_node/nurse_node.ino b/Codes and More/Hardware Code /nurse_node/nurse_node.ino new file mode 100644 index 0000000..f30a930 --- /dev/null +++ b/Codes and More/Hardware Code /nurse_node/nurse_node.ino @@ -0,0 +1,78 @@ +#include +#include +#include +#include //OLED + +#include +#include +#include +//#include +//#include + +#define OLED_RESET LED_BUILTIN //4 SDA > D2 , SCL D1 OLED STUFF +Adafruit_SSD1306 display(OLED_RESET); + +#if (SSD1306_LCDHEIGHT != 64) +#error("Height incorrect, please fix Adafruit_SSD1306.h!"); +#endif + + +//LiquidCrystal_I2C lcd(0x27, 16, 2); // Set the LCD address + // to 0x27 for a 16 chars + // and 2 line display + +const int port = 8080; +const char* host = "192.168.1.177"; + +const char* ssid = "scarX"; +const char* password = "1234567i"; + +String node_id = "id=3"; +String response = ""; +String call_id = ""; +bool call_status = false; + +RestClient client = RestClient(host,port); +ESP8266WebServer server(80); + +#define BUTTON_PIN D6 // DD6 +#define BUZZER_PIN D7 // D7 +//#define LCD_P1 14 // D5 LCD +//#define LCD_P2 12 // D6 + +EasyButton button(BUTTON_PIN); +bool toggle = true; + +void onPressed() { + if(call_status) + { + onpress_side(); + call_status = false; + } + else + { + clear_screen(); + } + + + Serial.println("Button has been pressed!"); +} + + +void setup() { + Serial.begin(115200); + display.begin(SSD1306_SWITCHCAPVCC, 0x3C); + button.begin(); + button.onPressed(onPressed); + pinMode(BUZZER_PIN, OUTPUT); + + //lcd_init(); + connection(); + route_server(); +} + +void loop() { + server.handleClient(); + connection(); + button.read(); +} diff --git a/Codes and More/Hardware Code /nurse_node/oled_part.ino b/Codes and More/Hardware Code /nurse_node/oled_part.ino new file mode 100644 index 0000000..6308892 --- /dev/null +++ b/Codes and More/Hardware Code /nurse_node/oled_part.ino @@ -0,0 +1,15 @@ +void print_screen(String str){ + display.clearDisplay(); + display.display(); + + display.setTextSize(2); + display.setTextColor(WHITE); + display.setCursor(0,0); + display.println(str); + display.display(); +} + +void clear_screen(){ + display.clearDisplay(); + display.display(); +} diff --git a/Codes and More/Hardware Code /nurse_node/server_side.ino b/Codes and More/Hardware Code /nurse_node/server_side.ino new file mode 100644 index 0000000..822d17e --- /dev/null +++ b/Codes and More/Hardware Code /nurse_node/server_side.ino @@ -0,0 +1,41 @@ + +void route_server(){ + server.on("/",HTTP_POST, incoming); + server.on("/alert",HTTP_POST, alert); + server.begin(); +} + +void incoming() { + Serial.println("Got One Incoming"); + + String security_code = "123456789"; + if (security_code == server.arg("sc")) + { + Serial.println("CALLING..."); + print_screen("CALLING..."); + buzz(); + String bed_id = server.arg("bed_id"); + call_id = "call_id=" + server.arg("call_id"); + Serial.println("Bed: "+bed_id); + server.send(200, "text/plain", "success"); + call_status = true; + return; + } + server.send(200, "text/plain", "404"); +} + + +void alert() { + Serial.println("Got One Alert!"); + + String security_code = "123456789"; + if (security_code == server.arg("sc")) + { + buzz(); + String msg = server.arg("msg"); + print_screen(msg); + server.send(200, "text/plain", "success"); + return; + } + server.send(200, "text/plain", "404"); +} diff --git a/Codes and More/Hardware Code /nurse_node/utlis.ino b/Codes and More/Hardware Code /nurse_node/utlis.ino new file mode 100644 index 0000000..251e966 --- /dev/null +++ b/Codes and More/Hardware Code /nurse_node/utlis.ino @@ -0,0 +1,20 @@ + +void connection(){ + if(WiFi.status() != WL_CONNECTED){ + print_screen("Connecting..."); + int a = client.begin(ssid,password); + + + if(WiFi.status() == WL_CONNECTED){ + init_server(); + Serial.println("Initialization Done"); + print_screen("Initialization Done"); + } + } +} + +void buzz(){ + digitalWrite(BUZZER_PIN, true); + delay(300); + digitalWrite(BUZZER_PIN, false); +} diff --git a/Codes and More/Hardware Code /rest_post_init_call/rest_post_init_call.ino b/Codes and More/Hardware Code /rest_post_init_call/rest_post_init_call.ino new file mode 100644 index 0000000..19b69a0 --- /dev/null +++ b/Codes and More/Hardware Code /rest_post_init_call/rest_post_init_call.ino @@ -0,0 +1,47 @@ +#include +#include +#include +#include + +#define SS_PIN D4 +#define RST_PIN D3 + +//const char* ssid = "Research Lab"; +//const char* password = "research12"; +const char* ssid = "scarX"; +const char* password = "1234567i"; + +const char* host = "192.168.1.81"; +const int port = 8080; + +MFRC522 mfrc522(SS_PIN, RST_PIN); +RestClient client = RestClient(host, port); +EasyButton button(D1); +String node_id = "id=1"; + + +// Callback function to be called when the button is pressed. +void onPressed() { + patient_call(client,node_id); + Serial.println("button pressed"); +} + +void setup() { + + Serial.begin(115200); + int a = client.begin(ssid, password); + init_server(client, node_id); + + button.begin(); + button.onPressed(onPressed); + pinMode(D2, OUTPUT); + + SPI.begin(); // Init SPI bus + mfrc522.PCD_Init(); // Init MFRC522 + Serial.println("RFID reading UID"); +} + +void loop() { + button.read(); + read_card(mfrc522); +} diff --git a/Codes and More/Hardware Code /rest_post_init_call/rfid.ino b/Codes and More/Hardware Code /rest_post_init_call/rfid.ino new file mode 100644 index 0000000..25c5e81 --- /dev/null +++ b/Codes and More/Hardware Code /rest_post_init_call/rfid.ino @@ -0,0 +1,29 @@ + +void read_card(MFRC522 mfrc522){ + +// String readID = ""; + + if ( mfrc522.PICC_IsNewCardPresent()) + { + if ( mfrc522.PICC_ReadCardSerial()) + { + Serial.print("Tag UID:"); +// for (byte i = 0; i < mfrc522.uid.size; i++) { +// Serial.print(mfrc522.uid.uidByte[i] < 0x10 ? " 0" : " "); +// Serial.print(mfrc522.uid.uidByte[i], HEX); +// readID += mfrc522.uid.uidByte[i]; +// } + unsigned long UID_unsigned; + UID_unsigned = mfrc522.uid.uidByte[0] << 24; + UID_unsigned += mfrc522.uid.uidByte[1] << 16; + UID_unsigned += mfrc522.uid.uidByte[2] << 8; + UID_unsigned += mfrc522.uid.uidByte[3]; + + String UID_string = (String)UID_unsigned; + Serial.println(UID_string); + Serial.println(); + mfrc522.PICC_HaltA(); + } + } + +} diff --git a/Codes and More/Hardware Code /rest_post_init_call/server_part.ino b/Codes and More/Hardware Code /rest_post_init_call/server_part.ino new file mode 100644 index 0000000..2162cd7 --- /dev/null +++ b/Codes and More/Hardware Code /rest_post_init_call/server_part.ino @@ -0,0 +1,28 @@ + +void post_request(RestClient client, String route_p, String concat_msg, int len){ + + String response = ""; + char msg[len]; + concat_msg.toCharArray(msg, len); + + char route[20]; + route_p.toCharArray(route,20); + int statusCode = client.post(route, msg, &response); +} + + + +void init_server(RestClient client, String node_id){ + + //Server Initializaion code, it will send + String ip_address = WiFi.localIP().toString(); + String concat_msg = "ip=" +ip_address+ "&" +node_id ; + + post_request(client, "/api/init/", concat_msg, 30); +} + + +void patient_call(RestClient client,String node_id){ + buzzer_sound(); + post_request(client, "/api/bed/", node_id, 10); +} diff --git a/Codes and More/Hardware Code /rest_post_init_call/utils.ino b/Codes and More/Hardware Code /rest_post_init_call/utils.ino new file mode 100644 index 0000000..a454ae0 --- /dev/null +++ b/Codes and More/Hardware Code /rest_post_init_call/utils.ino @@ -0,0 +1,18 @@ + +//#define BUTTON_PIN 0 //D3 +//#define PRESS_PIN 4 //D2 + +//const char* ssid = "Research Lab"; +//const char* password = "research12"; + +void buzzer_sound(){ + + bool toggle = true; + + Serial.println(toggle); + digitalWrite(D2, toggle); + delay(200); + toggle=!toggle; + digitalWrite(D2, toggle); + Serial.println("Button has been pressed!"); +} diff --git a/Codes and More/ncs/.idea/misc.xml b/Codes and More/ncs/.idea/misc.xml new file mode 100644 index 0000000..5204f8e --- /dev/null +++ b/Codes and More/ncs/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/Codes and More/ncs/.idea/modules.xml b/Codes and More/ncs/.idea/modules.xml new file mode 100644 index 0000000..ef4e787 --- /dev/null +++ b/Codes and More/ncs/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/Codes and More/ncs/.idea/ncs.iml b/Codes and More/ncs/.idea/ncs.iml new file mode 100644 index 0000000..dbf56e0 --- /dev/null +++ b/Codes and More/ncs/.idea/ncs.iml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Codes and More/ncs/.idea/vcs.xml b/Codes and More/ncs/.idea/vcs.xml new file mode 100644 index 0000000..6c0b863 --- /dev/null +++ b/Codes and More/ncs/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Codes and More/ncs/.idea/workspace.xml b/Codes and More/ncs/.idea/workspace.xml new file mode 100644 index 0000000..5c10205 --- /dev/null +++ b/Codes and More/ncs/.idea/workspace.xml @@ -0,0 +1,409 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + exclude + filter + node= + node + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+k+"-]").length||v.push("~="),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+k+"+*").length||v.push(".#.+[+~]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",$)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e===C||e.ownerDocument===m&&y(m,e)?-1:t===C||t.ownerDocument===m&&y(m,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===C?-1:t===C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]===m?-1:s[r]===m?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if((e.ownerDocument||e)!==C&&T(e),d.matchesSelector&&E&&!A[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){A(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=p[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&p(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?k.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?k.grep(e,function(e){return e===n!==r}):"string"!=typeof n?k.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(k.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||q,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:L.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof k?t[0]:t,k.merge(this,k.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),D.test(r[1])&&k.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(k):k.makeArray(e,this)}).prototype=k.fn,q=k(E);var H=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function P(e,t){while((e=e[t])&&1!==e.nodeType);return e}k.fn.extend({has:function(e){var t=k(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?k.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;nx",y.noCloneChecked=!!me.cloneNode(!0).lastChild.defaultValue;var Te=/^key/,Ce=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ee=/^([^.]*)(?:\.(.+)|)/;function ke(){return!0}function Se(){return!1}function Ne(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function Ae(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ae(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Se;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return k().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=k.guid++)),e.each(function(){k.event.add(this,t,i,r,n)})}function De(e,i,o){o?(Q.set(e,i,!1),k.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Q.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(k.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Q.set(this,i,r),t=o(this,i),this[i](),r!==(n=Q.get(this,i))||t?Q.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n.value}else r.length&&(Q.set(this,i,{value:k.event.trigger(k.extend(r[0],k.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Q.get(e,i)&&k.event.add(e,i,ke)}k.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.get(t);if(v){n.handler&&(n=(o=n).handler,i=o.selector),i&&k.find.matchesSelector(ie,i),n.guid||(n.guid=k.guid++),(u=v.events)||(u=v.events={}),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof k&&k.event.triggered!==e.type?k.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(R)||[""]).length;while(l--)d=g=(s=Ee.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=k.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=k.event.special[d]||{},c=k.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&k.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),k.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.hasData(e)&&Q.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(R)||[""]).length;while(l--)if(d=g=(s=Ee.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=k.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||k.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)k.event.remove(e,d+t[l],n,r,!0);k.isEmptyObject(u)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=k.event.fix(e),u=new Array(arguments.length),l=(Q.get(this,"events")||{})[s.type]||[],c=k.event.special[s.type]||{};for(u[0]=s,t=1;t\x20\t\r\n\f]*)[^>]*)\/>/gi,qe=/\s*$/g;function Oe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&k(e).children("tbody")[0]||e}function Pe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Re(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Me(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(Q.hasData(e)&&(o=Q.access(e),a=Q.set(t,o),l=o.events))for(i in delete a.handle,a.events={},l)for(n=0,r=l[i].length;n")},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=oe(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||k.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Vt,Gt=[],Yt=/(=)\?(?=&|$)|\?\?/;k.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Gt.pop()||k.expando+"_"+kt++;return this[e]=!0,e}}),k.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Yt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Yt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Yt,"$1"+r):!1!==e.jsonp&&(e.url+=(St.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||k.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?k(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Gt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Vt=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Vt.childNodes.length),k.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=D.exec(e))?[t.createElement(i[1])]:(i=we([e],t,o),o&&o.length&&k(o).remove(),k.merge([],i.childNodes)));var r,i,o},k.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(k.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},k.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){k.fn[t]=function(e){return this.on(t,e)}}),k.expr.pseudos.animated=function(t){return k.grep(k.timers,function(e){return t===e.elem}).length},k.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=k.css(e,"position"),c=k(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=k.css(e,"top"),u=k.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,k.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},k.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){k.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===k.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===k.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=k(e).offset()).top+=k.css(e,"borderTopWidth",!0),i.left+=k.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-k.css(r,"marginTop",!0),left:t.left-i.left-k.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===k.css(e,"position"))e=e.offsetParent;return e||ie})}}),k.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;k.fn[t]=function(e){return _(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),k.each(["top","left"],function(e,n){k.cssHooks[n]=ze(y.pixelPosition,function(e,t){if(t)return t=_e(e,n),$e.test(t)?k(e).position()[n]+"px":t})}),k.each({Height:"height",Width:"width"},function(a,s){k.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){k.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return _(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?k.css(e,t,i):k.style(e,t,n,i)},s,n?e:void 0,n)}})}),k.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){k.fn[n]=function(e,t){return 0 + + + + Monitoring + + + + + + + + + + + + +
+
+

Easy Nurse

+
+ +{# #} +{# #} +{# #} + +{##} +{#
#} +{#
#} +{# #} +{# #} + +
+
+ + + + + + + + + + + + + + + {% for call in calls%} + + + + + + + + + + {% endfor %} + +
ID NOBED NONURSECALL TIMEREC TIMESERVE TIMESTATUS
{{ call.id }}{{ call.bed }}{{ call.nurse.name }}{{ call.call_time }}{{ call.rec_time }}{{ call.serv_time }} + +
+
+
+ + + + + + + + \ No newline at end of file diff --git a/Codes and More/ncs/templates/data.html b/Codes and More/ncs/templates/data.html new file mode 100644 index 0000000..e056968 --- /dev/null +++ b/Codes and More/ncs/templates/data.html @@ -0,0 +1,10 @@ + + + + Umok Tumok Shumok + + +

Baal saal

+
+ +{{ call_id }} \ No newline at end of file diff --git a/Codes and More/ncs/templates/main.html b/Codes and More/ncs/templates/main.html new file mode 100644 index 0000000..3b8007a --- /dev/null +++ b/Codes and More/ncs/templates/main.html @@ -0,0 +1,71 @@ + + + + + Hello + + + + + + + + +{#

{{ shake }}

#} +

Nurse Calling System

+
+ + + + +
+
+ + + + + + \ No newline at end of file diff --git a/Conferance Paper NCS.pdf b/Conferance Paper NCS.pdf new file mode 100644 index 0000000..755ee7b Binary files /dev/null and b/Conferance Paper NCS.pdf differ diff --git a/Poster.pdf b/Poster.pdf new file mode 100644 index 0000000..aeab910 Binary files /dev/null and b/Poster.pdf differ diff --git a/README.md b/README.md new file mode 100644 index 0000000..8f7fca1 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# Nurse Conducting System +# This project has been done throughout CSE499A & CSE499B (CAPSTONE) +Summery: The proposed system is an IoT based real-time wireless nurse conducting system consisting of 3 majors parts : nurse calling device, local server and wireless wristband. A patient can call upon a nurse for an emergency case and the notification will be received in the nurse's wrist band. Most of the existing emergency calling system in the hospitals are based on hard-wired solution and a terminal which is a costly approach. The wireless solution that exists today is based on pager technology which is another costly approach. This project is based on a unified WiFi network which highly accessible and cheap to find thus making it one of the most minimalist approaches in this domain. The key component of this project is a microcontroller-based WiFi module ESP8266 and a local Server. This project can be used in any kind of scale depending on the need. This project promises to deliver much higher performance and coverage while it is closing the gap between the management and workers by monitoring calls real-time. \ No newline at end of file diff --git a/Report.pdf b/Report.pdf new file mode 100644 index 0000000..2dc62be Binary files /dev/null and b/Report.pdf differ