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

Tips for ESP32 board beginners

Shingo Fukui
November 27, 2018

Tips for ESP32 board beginners

obniz×M5Stack×NefryBT三つ巴Meetup!【ESP32開発ボードLT祭】
の発表資料

Shingo Fukui

November 27, 2018
Tweet

More Decks by Shingo Fukui

Other Decks in Programming

Transcript

  1. COPYRIGHT ©2018 SHINGO FUKUI ʮΘʔ͍ɺαϯϓϧϓϩάϥϜ͕ಈ͍ͨʂʯ ͷ࣍ʹਐΉͨΊͷ౾஌ࣝ 2018೥11݄27೔ obniz×M5Stack×NefryBTࡾͭ೹Meetup!
 ʲESP32։ൃϘʔυLTࡇʳ ෱Ҫ

    ᚸޗ
  2. COPYRIGHT ©2018 SHINGO FUKUI ࣗݾ঺հ ෱Ҫᚸޗ @SilkAndTikit ιϑτ΢ΣΞΤϯδχΞʢJava, JavaScript, …ʣ

    IoTͷษڧΛ࢝Ίͯ̏೥ܦա 2 IoTϋϯζΦϯ։࠵ ࣗಈਫ΍Γػ৬ਓ https://iot-gym.connpass.com
  3. COPYRIGHT ©2018 SHINGO FUKUI αϯϓϧϓϩάϥϜΛಈ͔͢ͷ͸؆୯ʂ ྫɿM5GO IoT Starter Kit ίωΫλʔͷ৭Λ߹Θͤͯܨ͙͚ͩ

    3
  4. COPYRIGHT ©2018 SHINGO FUKUI ެࣜҎ֎ͷ෦඼Λܨ͝͏ͱ͢Δͱ ྫɿGroveαʔϘϞʔλΛM5GOʹܨ͙ 4 A,B,CͷͲ͜ʹܨ͙ʁ ͳͥͦ͜ͳͷʁ ଞ͸μϝͳͷʁ

    ϓϩάϥϜͰͷPIN൪߸͸ ԿΛࢦఆ͢Δʁ
  5. COPYRIGHT ©2018 SHINGO FUKUI ϐϯ൪߸ͱػೳͷؔ܎ 5

  6. COPYRIGHT ©2018 SHINGO FUKUI υΩϡϝϯτΛݟͯΈΔͱ M5GOͷ৔߹ 6

  7. COPYRIGHT ©2018 SHINGO FUKUI υΩϡϝϯτΛݟͯΈΔͱ Nefry-BTͷ৔߹ 7 ஫ɿ্ਤ͸෱Ҫ͕࡞੒ͨ͠ਤͰ͢ɻNefry-BT R3ͷ৘ใͰ͢

  8. COPYRIGHT ©2018 SHINGO FUKUI ESP32͕࣋ͭػೳͱGroveϐϯͷؔ܎ σδλϧೖྗɾग़ྗ Ξφϩάೖྗɾग़ྗ PWM(Pulse Width Modulation)

    I2C SPI UART ɹɹɾɾɾ 8 ICνοϓͷϐϯ Groveϐϯ ػೳׂΓ౰ͯʢՄมʣ ݻఆ઀ଓ G21
  9. COPYRIGHT ©2018 SHINGO FUKUI ESP32ͷϐϯ΁ͷػೳׂΓ౰ͯ 9 http://wiki.ai-thinker.com/_media/esp32/docs/esp32_chip_pin_list_en.pdf

  10. COPYRIGHT ©2018 SHINGO FUKUI ྫ͑͹ 10 PORT໊ PIN൪߸ ೖग़ྗ σϑΥϧτػೳ

    PORT A 21 ೖྗɾग़ྗ I2C SDA 22 ೖྗɾग़ྗ I2C SCL PORT B 26 ೖྗɾग़ྗ 36 ೖྗͷΈ PORT C 16 ೖྗɾग़ྗ UART RXD ? 17 ೖྗɾग़ྗ UART TXD ?
  11. COPYRIGHT ©2018 SHINGO FUKUI σόΠεͷ࢓૊ΈΛཧղ͢Δ 11

  12. COPYRIGHT ©2018 SHINGO FUKUI ྫɿobnizͷαʔϘϞʔλʔϥΠϒϥϦ ճస֯౓Λࢦఆ͢Δؔ਺ ύϥϝʔλઃఆ༻ม਺ 12 ɾͱΓ͋͑ͣಈ࡞ͤ͞Δ͚ͩͳΒangle( )ͰOK

    ɾಈ࡞ͷਫ਼౓Λ্͛Δʹ͸rangeͷ஋Λมߋ ɾͦͷҙຯΛཧղ͢Δʹ͸αʔϘϞʔλͷ੍ޚํࣜͷཧղ͕ඞཁ
  13. COPYRIGHT ©2018 SHINGO FUKUI αʔϘϞʔλͷ੍ޚํࣜ ճసൣғ͸໿180౓ पظ 50Hzʢ20msʣ ύϧε෯ 0°:

    600μs 90°: 1,500μs 180°: 2,400μs Tower Pro SG92Rͷ৔߹ ύϧε෯ͷ௕୹Ͱճస֯౓Λ੍ޚ͢Δ
  14. COPYRIGHT ©2018 SHINGO FUKUI ৘ใೖखઌ 14

  15. COPYRIGHT ©2018 SHINGO FUKUI ESP32 ੡଄ݩͷυΩϡϝϯτ
 https://www.espressif.com/en/support/download/ documents?keys=ESP32 εΠοναΠΤϯεͷղઆϖʔδ(WROOM-32ͷ৘ใ?ʣ
 https://trac.switch-science.com/wiki/esp32_tips

    ଞʹ΋ɺάάΔͱ͍ͬͺ͍ग़ͯ͘Δ
 ɹݕࡧϫʔυɿESP32, WROOM-32ͳͲ 15
  16. COPYRIGHT ©2018 SHINGO FUKUI Facebookάϧʔϓ obniz: obnizϑΝϯɹ
 https://www.facebook.com/groups/515801048886860/ M5Stack M5Stack

    User Group Japan
 https://www.facebook.com/groups/154504605228235/ Nefry NefryϢʔβάϧʔϓ
 https://www.facebook.com/groups/nefry/ 16
  17. COPYRIGHT ©2018 SHINGO FUKUI obnizͷ৘ใ ൢചݩɿ CambrianRobotics inc. https://obniz.io ϑΥʔϥϜɿ

    https://forum.obniz.io FacebookΞΧ΢ϯτɹObniz https://www.facebook.com/obniz.io/ connpassάϧʔϓɹobniz.ioɹhttps://obniz.connpass.com FacebookάϧʔϓɹobnizϑΝϯɹ
 https://www.facebook.com/groups/515801048886860/ 17
  18. COPYRIGHT ©2018 SHINGO FUKUI M5Stackͷ৘ใ ൢചݩɹM5Stack Inc.
 http://m5stack.com/ ೔ຊࠃ಺ൢച୅ཧళɹεΠοναΠΤϯε
 https://www.switch-science.com

    Facebookάϧʔϓ M5Stack User Group Japan
 https://www.facebook.com/groups/154504605228235/ connpasάϧʔϓɹM5Stack User Group Japan
 https://m5stack.connpass.com ͦͷଞ
 ࣾ௕ͷJimmy Lai͞Μ͕Facebookάϧʔϓ΍twitterʹසൟʹ౤ߘͯ͠ ͍Δɻ24࣌ؒಇ͍͍ͯΔʁɹӨ෢ऀ͕ࡾਓ͙Β͍͍Δʁ 18
  19. COPYRIGHT ©2018 SHINGO FUKUI Nefryͷ৘ใ ൢചݩɹdotstudio,inc https://dotstud.io Facebookάϧʔϓ ɹNefryϢʔβάϧʔϓ
 https://www.facebook.com/groups/nefry/

    connpassάϧʔϓɹNefryUserMeetup
 https://nefry.connpass.com ͦͷଞ
 twitterͰnefryͱ͍͏จࣈྻΛೖΕͯʮಈ͔ͳ͍ʯʮࠔͬ ͨʯͱঢ়گΛͭͿ΍͘ͱɺ࡞ऀ͕ϔϧϓͯ͘͠ΕΔʢ৔ ߹͕ଟ͍ʣɻ 19