Upgrade to Pro — share decks privately, control downloads, hide ads and more …

北海道情報大学オープンキャンパス模擬講義「IoTプログラミング演習」 / HIUOC2022

yumulab
August 11, 2022

北海道情報大学オープンキャンパス模擬講義「IoTプログラミング演習」 / HIUOC2022

北海道情報大学オープンキャンパス模擬講義「IoTプログラミング演習」の資料

yumulab

August 11, 2022
Tweet

More Decks by yumulab

Other Decks in Technology

Transcript

  1. ()*+, • Internet of Things • Ϟϊ͕Πϯλʔωοτʹܨ͕Δ • ϋʔυ΢ΣΞΛѻ͏γεςϜͷϓϩάϥϛϯά •

    ޫɺಈ͖ɺԻ ͳͲͳͲ • ΞϓϦ΍ήʔϜͷϓϩάϥϛϯάͱ͸Կ͕ҧ͏͔ʁ • ΞϓϦ΍ήʔϜ͸ίϯϐϡʔλͷதʹด͍ͯ͡Δ • ϑΟδΧϧίϯϐϡʔςΟϯά͸ίϯϐϡʔλͷ֎ͷσʔλΛऔಘ ͨ͠Γϋʔυ΢ΣΞΛಈ͔͢ • ʮ૊ࠐΈίϯϐϡʔςΟϯάʯ΍ʮϑΟδΧϧίϯϐϡʔςΟϯάʯ ͱڞ௨఺΋͋Δ (एׯҧ͏৔߹΋͋Δ) 4
  2. 9:;<=>?@: • ී௨ͷPCͱൺ΂ͯ • ͍҆🙆 • খ͍͞🙆 • ௿ফඅిྗ🙆 •

    ੑೳ௿͍🙅 9 M5Stack Basic (¥5,203) https://ssci.to/3647 Arduino Uno R3 (¥3,300) https://ssci.to/789 micro:bit (¥2,200) https://ssci.to/6600 Raspberry Pi 4 Model B / 2GB (¥5,225) https://ssci.to/5681 ͜ͷߨٛͷର৅
  3. *EFGHBIJCRSTUV2 • χοΫωʔϜͰࢀՃ → χοΫωʔϜΛೖྗ • χοΫωʔϜ͸഑෍ͨ͠ࢴʹॻ͍͍ͯ·͢ (hiu01ʙhiu30) 14 ΫϦοΫ

    هೖ ΫϦοΫ ※ ՈͰ΍Δͱ͖͸ https://www.tinkercad.com/ ʹΞΫηεͯ͠ʮΞΧ΢ϯτΛ࡞੒ʯ ·ͨ͸ʮଞαʔϏεΞΧ΢ϯτ(Google / Apple / Microsoft / Facebook)ͰαΠϯΠ ϯʯ͍ͯͩ͘͠͞
  4. !"37^+ • (1) LEDΛޫΒͤΔ • (2) NeoPixel (LEDςʔϓ) ΛޫΒͤΔ •

    (3) NeoPixelͷ৭Λม͑ͯΈΔ • (4) LCDΛಈ͔ͯ͠දࣔจࣈΛม͑ͯΈΔ • (5) ͍ΖΜͳ෦඼(ελʔλʔ)Λಈ͔ͯ͠ΈΔ • ͨͿΜશ෦͸Ͱ͖ͳ͍ͷͰɺͥͻ͓͏ͪͰ΍ͬͯΈ͍ͯͩ͘͞ 17
  5. eH)fEgHh • Adafruitࣾ੡ͷϚΠίϯ಺ଂϑϧΧϥʔLED • ͭͳ͛ͯ૿΍ͤΔʂ • ςʔϓঢ়ɺϦϯάঢ়ʹͭͳ͕͍ͬͯΔ੡඼Λ࢖͏͜ͱ͕ଟ͍ • ੍ޚʹ͸ArduinoͳͲΛ࢖͏ •

    ϥΠϒϥϦΛ࢖͑͹͍͍ײ͡ʹͰ͖ΔͷͰɺ੍ޚํ๏ͷৄࡉΛ஌Βͳͯ͘΋େৎ෉ 23 Adafruit Industries, NeoPixel RGBW LEDs w/ Integrated Driver Chip - Natural White [~4500K - Black Casing - 10 Pack] https://www.adafruit.com/product/2761 $5.95 / 10ݸ εΠοναΠΤϯε, NeoPixel Ring - 12࿈ϑϧΧϥʔγϦΞϧLED https://www.switch-science.com/catalog/1593/ 1,177ԁ Adafruit Industries, NeoPixel Digital RGB LED Strip - White 30 LED - WHITE https://www.adafruit.com/product/1376 $16.95 / meter
  6. eH)fEgHhRbcd7 • ελʔλʔ (෦඼ͷ૊Έ߹Θͤ)ͷ഑ஔ 24 1. ελʔλʔ͔Β “Arduino” Λબ୒ 2.

    NeoPixelΛબ୒ͯ͠഑ஔ 3. γϛϡϨʔγϣϯΛ։࢝ ࢀߟɿ࣮ࡍͷNeoPixel
  7. _la • Liquid Crystal Display (=ӷথσΟεϓϨΠ) ͷུ • ArduinoͷΑ͏ͳϚΠίϯϘʔυͰ৘ใΛදࣔ͢Δوॏͳखஈ •

    16 × 2 (ԣ16จࣈɺॎ2จࣈ) • ഑ઢ͕େม • ελʔλʔʹ഑ઢࡁΈͷ΋ͷ͕͋ΔͷͰɺͦΕΛ࢖͏ͷָ͕ 27 ळ݄ిࢠ௨঎, ̡̘̙ΩϟϥΫλ σΟεϓϨΠϞδϡʔϧɹ̍̒×̎ ߦɹόοΫϥΠτ෇നൈ͖ https://akizukidenshi.com/catalog/g/ gP-02919/ 800ԁ
  8. xyzeH)fEgHh{<=|}~•€ • 3ຊͷ઀ଓ͕ඞཁɿ৴߸ઢɺ5VɺGND • ઀ଓͯ͠૿΍͢͜ͱ͕Ͱ͖Δ • Կݸ·Ͱ઀ଓͰ͖Δʁ → ߋ৽ϨʔτʹΑΔ •

    Tinkercadͩͱ100ݸۙ͘ͳΔͱॏ͘ͳΔ 34 ͜ΕͰ1ݸ 0 1 2 3 4 5 6 7 8 9 10 11 ৴߸͕ྲྀΕΔํ޲ ͭͳ͛ͯ૿΍ͤΔ (ಉ͡छྨͷ୺ࢠΛ઀ଓ) DIN:৴߸ઢೖྗ(Digital IN) 5V GND DO:৴߸ઢग़ྗ(Digital OUT)
  9. •EIB)‚ƒE„ • ଞͷϚΠίϯϘʔυ micro:bitʢϚΠΫϩϏοτʣ΋঺հ͠·͢ • 2015೥ʙ ։ൃ͞Εͨڭҭ༻ϚΠίϯϘʔυ • ΠΪϦεͰখֶੜʹແঈ഑෍͞Εͨ •

    ݱࡏ͸ϚΠΫϩιϑτࡿԼͷϓϩδΣΫτ • 2020೥ʹv2ʹόʔδϣϯΞοϓ • LED 5×5 = 25ݸɺϘλϯ2ݸɺεϐʔΧɺϚΠΫɺ໌Δ͞ηϯαʔɺՃ଎౓ηϯαʔɺ ࣓ྗηϯαʔɺԹ౓ηϯαʔɺແઢ௨৴ػೳʢBLEʣΛ౥ࡌ 35 εΠοναΠΤϯε, micro:bit https://ssci.to/6600 2,200ԁ ※ ൒ಋମෆ଍ͷӨڹͰ ݱࡏࡏݿͳ͠ɺೖՙະఆ
  10. pq#…† 37 εΠοναΠΤϯε, ArduinoΛ͸͡ ΊΑ͏Ωοτ https://ssci.to/181 4,400ԁ εΠοναΠΤϯε, The Arduino

    Starter Kitʢ೔ຊޠ൛ʣ https://ssci.to/2628 12,731ԁ εΠοναΠΤϯε, M5GO IoTε λʔλʔΩοτ V2.6 https://ssci.to/7363 9,845ԁ • ΋ͬͱֶͼ͍ͨਓ͸ɺͥͻ࣮ػΛߪೖͯ͠Έ͍ͯͩ͘͞ • ࠷ॳ͸Ωοτ͕͓͢͢ΊͰ͢ • Arduino୯ମͩͱ΄ͱΜͲԿ΋Ͱ͖ͳ͍ • ύʔπબͼ͕೉͍͠