1 / 14

Ubiquitous Computing Practice (Wi-Fi)

Ubiquitous Computing Practice (Wi-Fi). Youn-Hee Han, Chan- Myung Kim { yhhan , cmdr }@koreatech.ac.kr Laboratory of Intelligent Networks Advanced Technology Research Center Korea University of Technology http://link.koreatech.ac.kr. Introduction.

rico
Download Presentation

Ubiquitous Computing Practice (Wi-Fi)

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. Ubiquitous Computing Practice(Wi-Fi) Youn-Hee Han, Chan-Myung Kim {yhhan, cmdr}@koreatech.ac.kr Laboratory of Intelligent NetworksAdvanced Technology Research CenterKorea University of Technology http://link.koreatech.ac.kr

  2. Introduction Arduino – Wifi Shield (Recommended)

  3. Introduction SparkfunWifly Shield ArduinoWifi Shield (Recommended)

  4. ArduinoWiFi Shield http://arduino.cc/en/Main/ArduinoWiFiShield

  5. Wifi Library • Wifi • begin() • disconnect() • SSID() • RSSI() • … • Server • begin() • available() • write() • println() • … • Client • connected() • connect() • print() • println() • available() • read() • stop() • … http://arduino.cc/en/Reference/WiFi

  6. Post Tweet • . http://arduino-tweet.appspot.com/

  7. Setup if (WiFi.status() == WL_NO_SHIELD) { Serial.println("WiFi shield not present"); while(true); } while ( status != WL_CONNECTED) { Serial.print("Attempting to connect to SSID: "); Serial.println(ssid); status = WiFi.begin(ssid, key); delay(5000); }

  8. Encryption • Open (No Encryption) char ssid[] = "yourNetwork"; int status = WiFi.begin(ssid); • WPA char ssid[] = "yourNetwork"; char pw[] = “yourPassword"; intstatus = WiFi.begin(ssid, pw); • WEP char ssid[] = "yourNetwork"; char key[] = "D0D0DEADF00DABBADEAFBEADED"; // asciicode intkeyIndex = 0; intstatus = WiFi.begin(ssid, keyIndex, key);

  9. Post Tweet • . char server_adr[] = "arduino-tweet.appspot.com"; char[] token = “2E6p1VBvd7oA3S9xPjmHYB7fB4xbEvIf8”; String tweet = “트윗 내용”; if (twtclient.connect(server_adr, 80)) { Serial.println("connected"); twtclient.println("POST http://arduino-tweet.appspot.com/update HTTP/1.0"); twtclient.print("Content-Length: "); twtclient.println(tweet.length()+strlen(token)+14); twtclient.println(); twtclient.print("token="); twtclient.print(token); twtclient.print("&status="); twtclient.println(tweet); }

  10. Temperature + humidity

  11. Temperature + humidity int indata0; int indata1; float RH; float sRH; float temperatureC; indata0 = analogRead(0); sRH= (indata0 / 1024.0) /0.0062 - 0.16 / 0.0062; temperatureC= analogRead(1) * 0.004882814; temperatureC= (temperatureC - 0.5) * 100; RH = sRH / (1.0546 - 0.00216 * temperatureC);

  12. Indices • Discomfort Index • 1.8 * temperatureC - 0.55 * (1 - RH/100.0) * (1.8 * temperatureC - 26) + 32 • Food Poisoning Index • (1-exp(-exp(-4.4946+0.0701*temperatureC+0.0152*RH)))*185.66+26.14 • Deterioration Index • ((RH-65)/14)*pow(1.054, temperatureC) http://www.kma.go.kr/weather/lifenindustry/life_01.jsp?JISU_INFO=life3_03

  13. Post Tweet • .

  14. Thank You

More Related