アルコールモニタリングIoT / Alcohol monitoring IoT

B074a109c8bed590e36ce7d053c0d683?s=47 shanonim
February 28, 2019

アルコールモニタリングIoT / Alcohol monitoring IoT

2019.02.28
enebular developer Meetup Vol.8
https://enebular.connpass.com/event/117432/

B074a109c8bed590e36ce7d053c0d683?s=128

shanonim

February 28, 2019
Tweet

Transcript

  1. ΞϧίʔϧϞχλϦϯά*P5 FOFCVMBSEFWFMPQFS.FFUVQ7PM !TIBOPOJN

  2. ΫοΫύουגࣜձࣾങ෺ࣄۀ෦ ࣰݪ߂ޫ !TIBOPOJN "OESPJEJ04*P51SPUPUZQJOH

  3. None
  4. ϚΠίϯ .4UBDL Ͱ*P5ϓϩτλΠϐϯάΛͨ͠Γ͍ͯ͠·͢

  5. None
  6. w FOFCVMBSʢΤωϒϥʔʣ͸ɺ*P5੡඼ɾαʔϏεͮ͘ΓΛแׅతʹࢧԉ͢Δɺ։ൃɾӡ༻αʔϏ εͰ͢ɻΤοδͱΫϥ΢υʹ·͕ͨΔ*P5ΞϓϦέʔγϣϯΛ։ൃ͠ɺ༷ʑͳσόΠε΁ਝ଎ʹ σϓϩΠɺ๲େͳྔͷσʔλΛՄࢹԽ΍"*ʹΑΓར׆༻͢Δ͜ͱͰɺ*P5ΞϓϦέʔγϣϯͷ࠷ దͳӡ༻Λࢧԉ͠·͢ɻ ެࣜαΠτΑΓ  w IUUQTXXXFOFCVMBSDPNKBBCPVU FOFCVMBS

  7. None
  8. w 8JP-5& "MDPIPM4FOTPSͰΞϧίʔϧϞχλϦϯά*P5 w ਲ͍ΛՄࢹԽ͢Δ w ద౓ͳਲ͍Ͱɺ݈߁ͳ৯ੜ׆ΛखʹೖΕΑ͏ ࠓճͷςʔϚ

  9. 8JP-5&XJUI403"$0. (SPWF"MDPIPM4FOTPS BOBMPHWBMVF IUUQ1045 'JSFCBTF %BUB4PVSDF qPX JOGPNPUJPO

  10. None
  11. #include <stdio.h> #include <WioLTEforArduino.h> #include <limits.h> #define INTERVAL (5000) #define

    SENSOR_PIN (WIOLTE_A6) #define URL “https://<YOUR-DOMAIN>.herokuapp.com/upload" WioLTE Wio; int alcohol = 0; void setup() { // Connect LTE delay(200); SerialUSB.println("--- START ---------------------------------------------------"); SerialUSB.println("### I/O Initialize."); Wio.Init(); SerialUSB.println("### Power supply ON."); Wio.PowerSupplyLTE(true); delay(500); SerialUSB.println("### Turn on or reset."); if (!Wio.TurnOnOrReset()) { SerialUSB.println("### ERROR! ###"); return; } delay(3000); SerialUSB.println("### Setup completed."); }
  12. void loop() { char data[100]; int status; alcohol = analogRead(SENSOR_PIN);

    SerialUSB.print("sensor test value = "); SerialUSB.println(alcohol); delay(1000); sprintf(data, "{\"alcohol\": %d}", alcohol); if (!Wio.HttpPost(URL, data, &status)) { SerialUSB.println("### ERROR! ###"); goto err; } err: delay(3000); }
  13. None
  14. None
  15. None
  16. ύʔιφϧՃ࣪ˍۭؾਗ਼ড়ػʮΤΞΫϦʔϯωοΫόϯυʯ IUUQTXXXUIBOLPKQTIPQEFUBJM ͜͜ʹ෇͚͍ͨ JOQSPHSFTT

  17. Ϣʔεέʔε w टݩͰৗʹΞϧίʔϧݕ஌ w JGҿΈ͗ͯͨ͢Β w ৼಈ w ిؾ w

    DVSSFOUTUBUVTΛπΠʔτ w ೋ೔ਲ͍͕ະવʹ๷͛ΔͷͰϋοϐʔ
  18. ࡶײ w ʮఆظతʹσʔλऔಘͯ͠ՄࢹԽ͍ͨ͠ʯཁ݅Λγϡοͱ࡞Εͯ࠷ߴʂʂʂ̍ w 'JSFCBTFʹஷΊͯΔσʔλΛผ్׆༻͢Ε͹΋ͬͱ͍Ζ͍ΖͰ͖ͦ͏ w ΞϓϦ࡞ͬͨΓɺCPUͱ࿈ܞͨ͠Γ w /PEF3&%εΩϧ্͍͛ͨ w

    JOGPUZQF΋+4ͳͷͰɺ࣮࣭δϟόεΫϦϓτ*P5ͳͷͰ͸ʁʂʁʂ