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

話題のRaspberryPi PicoでMicroPythonを使って遊ぼう!

88dae28e3d082236f37db2f5c2db339d?s=47 Miho Yamada
February 28, 2021

話題のRaspberryPi PicoでMicroPythonを使って遊ぼう!

令和3年2月28日開催@エンジニアカフェ
「話題のRaspberryPi PicoでMicroPythonを使って遊ぼう!」

RaspberryPi Picoの環境設定、Lチカ、温度センサの値を取得するまで。

88dae28e3d082236f37db2f5c2db339d?s=128

Miho Yamada

February 28, 2021
Tweet

Transcript

  1. ࿩୊ͷRaspberryPi PicoͰMicroPythonΛ࢖ͬͯ༡΅͏ʂ ✨ ✨ ✨ ̍ϖʔδ

  2. #jyoshidarake ࠓ೔࢖͏Ϟϊ ᶃRaspberryPi Pico ᶄΠϯλʔωοτʹ઀ଓ͍ͯ͠Δύιίϯ ʢZOOMΛ࢖͍ͳ͕ΒPicoΛUSBͰͭͳ͙ʣ ᶅUSBέʔϒϧʢPicoͱύιίϯΛͭͳ͙ʣ ᶆQRίʔυΛಡΈࠐΊΔεϚϗ ʢ͋Ε͹iPhone͔iPadʣ ✨

    ✨ ✨ ̎ϖʔδ
  3. #jyoshidarake ࠓ೔👀΍Δࣄͱ΍Βͳ͍ࣄ ⭕RaspberryPi PicoͰMicroPythonΛ࢖͏ ɹͷʹඞཁͳ΋ͷΛΠϯλʔωοτ͔Β ɹμ΢ϯϩʔυͯ͠ઃఆ͠·͢ɻ ⭕MicroPythonͷϓϩάϥϜΛֶΜͰɺLνΧ ɹͱԹ౓ଌఆΛ͠·͢ɻ ✖͸Μͩ෇͚͸͠·ͤΜɻ ̏ϖʔδ

  4. KZPTIJEBSBLF ঁࢠͩΒ͚ͷిࢠ޻࡞࿩୊ͷ3BTQCFSSZ1J1JDPͰ.JDSP1ZUIPOΛ࢖ͬͯ༡΅͏ʂ ̐ϖʔδ

  5. ঁࢠͩΒ͚ͷిࢠ޻࡞࿩୊ͷ3BTQCFSSZ1J1JDPͰ.JDSP1ZUIPOΛ࢖ͬͯ༡΅͏ʂ ̑ϖʔδ

  6. ঁࢠͩΒ͚ͷిࢠ޻࡞࿩୊ͷ3BTQCFSSZ1J1JDPͰ.JDSP1ZUIPOΛ࢖ͬͯ༡΅͏ʂ ̒ϖʔδ νϟϯωϧొ࿥ ΑΖ͓͘͠ئ͍͠·͢

  7. ͋ͳ͕ͨࠓZoomΛͭͳ͍͛ͯΔͷ͸ʁ ࣭໰̍ www.menti.com and use the code 22 94 41

    0 ̓ϖʔδ
  8. ࠓ೔ͷҙؾࠐΈΛೖྗ͍ͩ͘͞ʂ ࣭໰̎ Go to www.menti.com and use the code 42

    97 81 2 ̔ϖʔδ
  9. RaspberryPiͬͯԿʁ RaspberryPi͸೔ຊͰ͸ϥζύΠͱݺͼ਌͠·Ε͍ͯΔ γϯάϧϘʔυίϯϐϡʔλʔͰ͢ɻ ͜ͷϥζϕϦʔͷ ϚʔΫ͕໨ҹ ̕ϖʔδ

  10. RaspberryPiͷछྨ ࠓ೔͸ίϨʂ ଞʹ΋ ଓʑ ొ৔தʂ ̍̌ϖʔδ

  11. ͋ͳ͕͍ͨ࣋ͬͯΔϥζύΠ͸ʁ ࣭໰̏ Go to www.menti.com and use the code 74

    16 84 7 ̍̍ϖʔδ
  12. ࠓ·ͰͷRaspberryPiͷ࢖͍ํ ྫ ̍̎ϖʔδ

  13. Α͘ݴΘΕΔArduinoͱͷҧ͍ "SEVJOPͱ͸ɺ ΠλϦΞੜ·Εͷ ϫϯϘʔυϚΠίϯͰ͢ Α͘ൺֱ͞ΕΔArduinoʂ ࠓ·Ͱେ͖͘ҧ͏͜ͱ͸OS͕ ಈ͘ͱ͍͏͜ͱͰͨ͠ʂ ࠓ·ͰͷRaspberryPi͸ SDΧʔυʹOSΛೖΕͯಈ͔͍ͯ͠·ͨ͠ʂ ʢRaspbian,Raspberry

    Pi OS, Windows 10 IOT Core,Ubuntu MATEͳͲɻʣ Raspberry Pi Picoʹ͸SDΧʔυ͸͋Γ·ͤΜɻ ̍̏ϖʔδ
  14. Picoɾ࣮͸OSಈ͍ͪΌ͏ΜͰ͢ SDΧʔυϞδϡʔϧΛ ଍ͯ͋͛͠Δͱʂ UnixʢFuzix)Λ ಈ͔͢͜ͱ͕Ͱ͖Δ ͦ͏Ͱ͢ʂ ޙ೔ͥͻτϥΠͯ͠Έͯ ͍ͩ͘͞ʂ ̍̐ϖʔδ

  15. RaspberryPiPicoͬͯʁ ̍̑ϖʔδ

  16. RaspberryPiPicoͬͯʁ ̍̒ϖʔδ ▪特徴・主な仕様 ・搭載マイコン:RP2040(Dual-core cortex M0+、 最大動作周波数133MHz) ・仕上りパッケージ:DIP40 ・SRAM:264KB ・フラッシュメモリ:2MB

    ・USB 1.1 ホスト/デバイス両対応 ・ピンヘッダ用ランドと別に端面スルーホール ・低消費電力スリープモードおよびドーマントモードが 利用可能 ・USBを介しマスストレージを使ったドラッグアンドドロップ によるプログラムの書き込みが可能 ・I/O:GPIOx26(ADCx3含む)、UARTx2、I2Cx2、 SPIx2、PWMx16、PIOx8 ・ピンヘッダ取り付け穴径: Φ1(ミリ)、ピンヘッダ/ 細ピンヘッダのどちらでも使用できます。
  17. PicoΛ࢖ͬͯΈΑ͏ʂ ̍̓ϖʔδ

  18. uf2ϑΝΠϧΛμ΢ϯϩʔυ͠·͢ Zoomͷը໘ͷԼʹ͋Δ νϟοτͷϚʔΫΛΫϦοΫ ͯ͠νϟοτը໘Λ։͖·͢ɻ షͬͨϦϯΫΛΫϦοΫͯ͠ ϑΝΠϧΛμ΢ϯϩʔυ ͪͳΈʹɾɾɾ uf2ϑΝΠϧͱ͸ Microsoft͕ϚΠί ϯϑϥογϡ޲͚ʹ

    ։ൃͨ͠ϑΝΠϧܗ ࣜͱͷ͜ͱͰ͢ɻ https://www.raspberrypi.org/ documentation/rp2040/getting-started/ static/f70cc2e37832cde5a107f6f2af06b4bc/ rp2-pico-20210205-unstable-v1.14-8- g1f800cac3.uf2 ग़དྷͳ͍ਓ͸ͪ͜ΒΛίϐϖ͍ͯͩ͘͠͞ɻ ̍̔ϖʔδ
  19. ઌʹύιίϯʹέʔϒϧΛͭͳ͗·͢ɻ ന͍ϘλϯΛԡ͠ ͳ͕Βύιίϯʹ ͭͳ͛·͢ʂ ʢRaspberry Pi PicoͷBOOTSELͬͯॻ͍ͯΔ ϘλϯΛԡ͠ͳ͕ΒέʔϒϧΛૠ͢ʣ BOOTSELϘλϯΛ ԡ͠ͳ͕Βͭͳ͛Δ

    ࣄͰɺօ͞Μ΋࢖ͬ ͨ͜ͱ͕͋ΔUSB ʢϑϥογϡʣϝϞ Ϧͱಉ͡Α͏ͳ࢖͍ ํ͕Ͱ͖·͢ɻ USBϑϥογϡϝϞϦ ίϯϏχ͔Β ফ͑ͭͭ͋Γ·͢Ͷɾɾɾ ̍̕ϖʔδ
  20. ϘλϯΛԡ͠ͳ͕ΒPicoΛܨ͙ͱ USBϝϞϦΛૠͨ࣌͠ͷΑ͏ʹೝࣝ͞Ε·͢ ઌఔμ΢ϯϩʔυͨ͠uf2ϑΝΠϧΛ RPI-RP2ʹυϥοά&υϩοϓ͠·͢ɻ ̎̌ϖʔδ

  21. ϘλϯΛԡ͠ͳ͕ΒPicoΛܨ͙ͱೝࣝ͞ΕΔ ઌఔμ΢ϯϩʔυͨ͠uf2ϑΝΠϧΛ RPI-RP2ʹυϥοά&υϩοϓ͠·͢ɻ Windows ̎̍ϖʔδ

  22. ࣍ʹThonnyΛμ΢ϯϩʔυ͠·͢ ̔ϖʔδ Zoomͷ νϟοτʹ షͬͨ ϦϯΫΛ ΫϦοΫ ग़དྷͳ͍ਓ͸ͪ͜ΒΛίϐϖͯ͠Ͷ https://thonny.org/ ̎̎ϖʔδ

  23. ࣍ʹThonnyΛμ΢ϯϩʔυ͠·͢ ̎̏ϖʔδ ࣗ෼ͷύιίϯͷOSʹ߹Θͤͯ μ΢ϯϩʔυ͍ͯͩ͘͠͞ 5IPOOZ͸ॳ৺ऀ޲͚ͷ 1ZIUPOʢύΠιϯʣͱ ͍͏ϓϩάϥϜݴޠͷ *%&Ͱ͢ɻ *%&ͱ͸ JOUFHSBUFE

    EFWFMPQNFOU FOWJSPONFOU  ͷུͰ೔ຊޠͰ͸ ౷߹։ൃ؀ڥͱ͍͍·͢
  24. ThonnyΛΠϯετʔϧ͠·͢ ΫϦοΫͯ͠ThonnyͷΠϯετʔϥΛଓ͚Δ Mac͸.pkgɺWindows͸.exeϑΝΠϧͰ͢ ̎̐ϖʔδ

  25. ࢖༻ڐ୚ܖ໿ͷ৚݅ʹಉҙͯ͠ଓ͚ͯΠϯετʔϧ ɾpkgΛΫϦοΫͯ͠ThonnyͷΠϯετʔϥΛଓ ͚·͢ ̎̑ϖʔδ

  26. ࣗ͝਎ͷύιίϯͷύεϫʔυΛೖΕͨΒ׬ྃͰ͢ Πϯετʔϧ͕׬ྃͨ͠Βด͡ΔΛΫϦοΫ͍ͩ͘͞ɻ ࣗ෼ͷϢʔβʔ໊ ̎̒ϖʔδ

  27. Thonnyͷexe͕ΠϯετʔϧͰ͖ͨΒ Windows ɹɹexeΛΫϦοΫͯ͠acceptΛબ୒ͯ͠ setup͠·͢ɻ ̎̓ϖʔδ

  28. ThonnyΛ։͍͍ͯͩ͘͞ɻ ̎̔ϖʔδ ɹɹMicroPythonΛબͿ

  29. MicroPythonͱ͸ʁ Pythonͷจ๏Λ࢖ͬͯϚΠίϯ΍૊ΈࠐΈػثͷ ϓϩάϥϛϯά͕Ͱ͖ΔϓϩάϥϜͷ͜ͱͰ͢ɻ Python͸1991೥ʢฏ੒3೥ʣʹॳΊͯϦϦʔε͞Ε ͨϓϩάϥϛϯάݴޠͰɺAIʢਓ޻஌ೳʣ΍ػցֶश ෼໺Ͱଟ͘࢖༻͞Ε͍ͯ·͢ɻ Python͸༷ʑͳαʔϏεͰར༻͞Ε͍ͯΔݴޠͰ͢ ̎̕ϖʔδ

  30. MicroPythonͰLνΧͯ͠ΈΑ͏ʂ LνΧͱ͸ʁ || LEDΛνΧνΧ ޫΒͤΔ͜ͱͰ͢ɻ ̏̌ϖʔδ

  31. LνΧͱ͸ʁ || LEDΛνΧνΧޫΒͤΔ͜ͱͰ͢ɻ ͜ͷLEDΛޫΒͤ·͢ RaspberryPi PicoΛޫΒͤΑ͏ʂ ̏̍ϖʔδ

  32. MicroPythonͰLνΧͯ͠ΈΑ͏ʂ import machine import utime led_onboard = machine.Pin(25, machine.Pin.OUT) while

    True: led_onboard.value(1) utime.sleep(5) led_onboard.value(0) utime.sleep(5) ্هͷϓϩάϥϜશମΛThonnyʹίϐ΃ޙ ͜ͷ෦෼ͷஈࠩΛλϒΩʔͰ͚͍ͭͯͩ͘͞ɻ ̏̎ϖʔδ
  33. MicroPythonͰLνΧͯ͠ΈΑ͏ʂ import machine import utime led_onboard = machine.Pin(25, machine.Pin.OUT) while

    True: led_onboard.value(1) utime.sleep(5) led_onboard.value(0) utime.sleep(5) ͜ͷஈࠩΛΠϯσϯτͱ͍͍·͢ɻpython͸ ͜ͷΠϯσϯτΛೝࣝ͢ΔͷͰɺஈࠩʹҙຯ͕ ͋Γ·͢ɻ͜ͷ৔߹͸whileจͷ܁Γฦ͠෦Ґ ̏̏ϖʔδ
  34. MicroPythonͰϓϩάϥϜͷઆ໌ᶃ import machine import utime import --- MicroPythonͷϞδϡʔϧΛݺͼग़͢͠Δ machine ---

    ϋʔυ΢ΣΞؔ࿈ͷؔ਺ utime -- ࣌ؒؔ࿈ͷؔ਺ ̏̐ϖʔδ
  35. MicroPythonͰϓϩάϥϜͷઆ໌ᶄ led_onboard = machine.Pin(25, machine.Pin.OUT) ͜ͷ໋ྩจͰ͸ MFE@POCPBSEͱ͍͏໊લʢม਺ʣʹ NBDIJOF1JOʢ NBDIJOF1JO065 

    ൪ϐϯͷग़ྗΛׂΓ౰ͯΔͱ͍͏ҙຯͰ͢ɻ ̏̑ϖʔδ
  36. MicroPythonͰϓϩάϥϜͷઆ໌ᶅ while True: led_onboard.value(1) utime.sleep(5) led_onboard.value(0) utime.sleep(5) while True: ͱ͸ʮXIJMF

    ৚݅ࣜ:ʯͱ͍͏ܗࣜͰॻ͔Ε͍ͯ·͢ɻ TrueʹʢਅʣʹͳΔ·Ͱ܁Γฦ͢ͱ͍͏͜ͱͰ͢ɻ ̏̒ϖʔδ
  37. MicroPythonͰϓϩάϥϜͷઆ໌ᶅ while True: led_onboard.value(1) utime.sleep(5) led_onboard.value(0) utime.sleep(5) led_onboard.value(1)͸MFE_onboardͷ஋Λ̍ʹ utime.sleep(5) ͸5ඵٳΉ

    led_onboard.value(0)͸MFE_onboardͷ஋Λ0ʹ utime.sleep(5) ͸࠶ͼ5ඵٳΉ ͜ͷॲཧΛ܁Γฦ͠·͢ɻ ̏̓ϖʔδ
  38. PicoͰLνΧͯ͠ΈΑ͏ʂ import machine import utime led_onboard = machine.Pin(25, machine.Pin.OUT) while

    True: led_onboard.value(1) utime.sleep(5) led_onboard.value(0) ͜ͷϚʔΫΛԡ͢ͱϓϩάϥϜ໊Λ ฉ͔Ε·͢ͷͰs1.pyͱೖྗͯ͠ ϓϩάϥϜΛ࣮ߦͤ͞·͢ɻ ̏̔ϖʔδ
  39. LνΧͱ͸ʁ || LEDΛνΧνΧޫΒͤΔ͜ͱͰ͢ɻ ͕͜͜5ඵޫͬͯ5ඵফ͑ΔΛ ܁Γฦ͠·͢ɻ RaspberryPi PicoΛޫΒͤΑ͏ʂ ̏̕ϖʔδ

  40. import machine import utime led_onboard = machine.Pin(25, machine.Pin.OUT) while True:

    led_onboard.value(1) utime.sleep(5) led_onboard.value(0) utime.sleep(5) ͜ͷ̎Օॴͷ̑Λ̍ʹ มߋͯ͠Έ·͠ΐ͏ɻ LνΧͷ଎౓Λม͑ͯΈΑ͏ʂ ̐̌ϖʔδ
  41. LνΧͷ଎౓Λม͑ͯΈΑ͏ʂ import machine import utime led_onboard = machine.Pin(25, machine.Pin.OUT) while

    True: led_onboard.value(1) utime.sleep(5) led_onboard.value(0) Ұ୴STOPϚʔΫΛԡͯ͠ લͷϓϩάϥϜΛఀࢭͤ͞·͢ɻ ̐̍ϖʔδ
  42. LνΧͷ଎౓Λม͑ͯΈΑ͏ʂ import machine import utime led_onboard = machine.Pin(25, machine.Pin.OUT) while

    True: led_onboard.value(1) utime.sleep(5) led_onboard.value(0) ࠶ͼ࣮ߦϚʔΫΛԡ͠·͢ɻ ̐̎ϖʔδ
  43. LνΧͱ͸ʁ || LEDΛνΧνΧޫΒͤΔ͜ͱͰ͢ɻ ͕͜͜1ඵޫͬͯ1ඵফ͑ΔΛ ܁Γฦ͠·͢ɻ LνΧͷ଎౓Λม͑ͯΈΑ͏ʂ ̐̏ϖʔδ

  44. ͕͜͜1ඵޫͬͯ1ඵফ͑ΔΛ ܁Γฦ͠·͢ɻ Picoͷϐϯ഑ஔ ̐̐ϖʔδ

  45. MicroPythonͰԹ౓ଌఆͯ͠ΈΑ͏ʂ import machine import utime sensor_temp = machine.ADC(4) conversion_factor =

    3.3 / (65535) while True: reading = sensor_temp.read_u16() * conversion_factor temperature = 27 - (reading - 0.706)/0.001721 print(temperature) utime.sleep(1) ্هͷϓϩάϥϜશମΛThonnyʹίϐ΃ޙ ͜ͷ෦෼ͷஈࠩΛλϒΩʔͰ͚͍ͭͯͩ͘͞ɻ ̐̑ϖʔδ
  46. MicroPythonͰϓϩάϥϜͷઆ໌ᶃ import machine import utime import --- MicroPythonͷϞδϡʔϧΛݺͼग़͢͠Δ machine ---

    ϋʔυ΢ΣΞؔ࿈ͷؔ਺ utime -- ࣌ؒؔ࿈ͷؔ਺ ̐̒ϖʔδ
  47. MicroPythonͰϓϩάϥϜͷઆ໌ᶄ sensor_temp = machine.ADC(4) ͜ͷ໋ྩจͰ͸ TFOTPS@UFNQͱ͍͏໊લʢม਺ʣʹ NBDIJOF"%$ʢ ɹ Թ౓ηϯαʔͷ஋ΛׂΓ౰ͯ·͢ɻ ʢԹ౓ηϯαʔ͸"%$ͷνϟωϧʹ઀ଓ͞Ε͍ͯ·͢ʣ

    ̐̓ϖʔδ
  48. MicroPythonͰϓϩάϥϜͷઆ໌ᶅ conversion_factor = 3.3 / (65535) ͜ͷ໋ྩจͰ͸ DPOWFSTJPO@GBDUPSͱ͍͏໊લʢม਺ʣʹ  

     ͷܭࢉ஋ΛׂΓ౰ͯΔͱ͍͏ҙຯͰ͢ɻ ͸QJDPͷిѹ ͸όΠτͰදݱͰ͖Δ࠷େ஋Ͱ͢ ̐̔ϖʔδ
  49. ̎ਐ਺ͱిѹͱόΠτͱϏοτ ઌ΄ͲͷϓϩάϥϜͷҙຯΛཧղ͍ͯͨͩͨ͘͠Ίʹ ̌ͱ̍Ͱදݱ͞ΕΔ਺஋ʢ̎ਐ਺ʣͱిѹͷ࿩Λ͠·͢ɻ ίϯϐϡʔλʔ͸ߴ౓ͳܭࢉΛ͍ͯ͠·͕͢ɺͬ͘͟Γݴ͍·͢ͱɺ ࣮͸ిѹ͕͋Δɺͳ͍Λ۠ผͯ͠ܭࢉΛ͍ͯ͠Δ͚ͩͳΜͰ͢ɻ ిѹ͕͋Δ࣌Λ )JHI ɺͳ͍࣌Λ -PX ͱͯ͠ɺ̌ͱ̍ͷܭࢉΛɺ

    ΊͬͪΌ଎͍଎౓Ͱ͍ͯ͠·͢ɻ ɹɹ̌ɹɹ̌ɹɹ̌ɹɹ̌ɹɹ̌ɹɹ̌ɹɹ̍ɹɹ̍ ɹ ɹɹɹˢϏοτ ɹɹɹ̎ਐ਺ͷܻ̍ɹɹશ෦Ͱ̔Ϗοτɹ̔Ϗοτ CJU ʹ̍όΠτ CZUF ɹɹ ɹɹɹɹɹɹɹɹɹɹɹɹɹɹ 10ਐ਺ ͩͱ ̏ ྫ͑͹ ̑7 ̐̕ϖʔδ
  50. ̍ɹ̍ɹ̍ɹ̍ɹ̍ɹ̍ɹ̍ɹ̍ɹ̍ɹ̍ɹ̍ɹ̍ɹ̍ɹ̍ɹ̍ɹ̍ 2όΠτͷ࠷େ஋ͱ͸ ઌఔʮ͸όΠτͰදݱͰ͖Δ࠷େ஋Ͱ͢ʯͱݴ͍·͕ͨ͠ ਤʹͯ͠ΈΔͱΘ͔Γ΍͍͢ͱࢥ͍·͢ɻ ԼਤͷΑ͏ʹϏοτશ෦͕̍ʹͳ͍ͬͯΔ͕࣌࠷େ஋ʹͳΓ·͢ɻ ̍Ϗοτ͸ɺ͔̌̍ͷ̎௨ΓͰɺͦΕ͕ݸ͋ΔͷͰɺ ̎ͷ̍̒৐Λܭࢉ͢Δͱɺ?ͱͳΓ·͢ɻ   

    ̑̌ϖʔδ
  51. MicroPythonͰϓϩάϥϜͷઆ໌ᶆ while True: reading = sensor_temp.read_u16() * conversion_factor temperature =

    27 - (reading - 0.706)/0.001721 print(temperature) utime.sleep(1) while True: ͱ͸ʮXIJMF ৚݅ࣜ:ʯͱ͍͏ܗࣜͰॻ͔Ε͍ͯ·͢ɻ TrueʹʢਅʣʹͳΔ·Ͱ܁Γฦ͢ͱ͍͏͜ͱͰ͢ɻ ̑̍ϖʔδ
  52. MicroPythonͰϓϩάϥϜͷઆ໌ᶆ reading = sensor_temp.read_u16() * conversion_factor ͸TFOTPS_temp ΛSFBE_u16()ͰಡΜͰ͍ΔͷͰΞφϩά஋Λ0- 65535 ͷൣғͷ੔਺Ͱฦ͠·͢ɻ

    temperature = 27 - (reading - 0.706)/0.001721 ͜Ε͸Թ౓ηϯαʔͷ஋Λิਖ਼͢ΔࣜͰ͢ɻ print(temperature) ͸UFNQFSBUVSFͷ஋(Թ౓ʣΛදࣔ͠·͢ɻ utime.sleep(1) ͸1ඵٳΉ ͜ͷॲཧΛ܁Γฦ͠·͢ɻ while True: reading = sensor_temp.read_u16() * conversion_factor temperature = 27 - (reading - 0.706)/0.001721 print(temperature) utime.sleep(1) ̑̎ϖʔδ
  53. Ξφϩά-σΟδλϧίϯόʔλ(ADC) Ξφϩά৴߸ˠσδλϧ৴߸ʹม͑Δ͜ͱΛ"%ม׵ͱݴ͍·͢ɻ Ξφϩά৴߸ σδλϧ৴߸ ࣌ؒʢtʣ Թ౓ ࣌ؒʢtʣ Թ౓ ຊདྷͳΒ3BTQCFSSZ1J1JDPͷ෼ղೳ͸CJU ࠷େ஋͸?ిѹ͕7ͳͷͰ

    㲈N7 ͳΜͰ͕͢ɺ͜ͷϓϩάϥϜͰ͸SFBE@V ͰΞφϩά஋ΛಡΜ Ͱ͍ΔͷͰɺʹ㲈N7 ̑̏ϖʔδ Ξφϩά৴߸Λ ෼ׂ͢Δ਺ ෼ղೳ͕େ͖͍ఔ ׈Β͔ʹͳΔ
  54. ಈ͍͍ͯΔϓϩάϥϜΛఀࢭ͠·͢ Ұ୴STOPϚʔΫΛԡͯ͠ લͷϓϩάϥϜΛఀࢭͤ͞·͢ɻ import machine import utime sensor_temp = machine.ADC(4)

    conversion_factor = 3.3 / (65535) while True: reading = sensor_temp.read_u16() * conversion_fa temperature = 27 - (reading - 0.706)/0.001721 ̑̐ϖʔδ
  55. Թ౓ηϯαʔͷ஋ΛݟͯΈΑ͏ʂ import machine import utime sensor_temp = machine.ADC(4) conversion_factor =

    3.3 / (65535) while True: reading = sensor_temp.read_u16() * conversion_fa temperature = 27 - (reading - 0.706)/0.001721 ࣮ߦϚʔΫΛԡ͢ͱϓϩάϥϜ໊Λ ฉ͔Ε·͢ͷͰs2.pyͱೖྗͯ͠ ϓϩάϥϜΛ࣮ߦͤ͞·͢ɻ ̑̑ϖʔδ
  56. Թ౓ηϯαʔͷ஋ΛݟͯΈΑ͏ʂ ͜͜ʹԹ౓͕1ඵຖʹදࣔ͞Ε·͢ɻ Թ౓͕ग़ͨਓ͸ɺPicoΛखͰԹΊͯ஋͕มΘΔ͔ ͔֬ΊͯΈ·͠ΐ͏ʂʂ Թ౓্͕͕Ε͹ਖ਼ղͰ͢ʂ ̑̒ϖʔδ

  57. https://apps.apple.com/jp/app/adafruit-ar/id1375722584 Adafruit AR ΞϓϦͰݟͯΈΑ͏ʂ iPhoneɾiPad iOS14ͷΈର৅Ͱ͢ɻ ̑̓ϖʔδ

  58. #jyoshidarake ࠓޙ͋Δͱָ͠ΊΔϞϊ ɾ͸Μͩͯ͝ηοτˍ͸Μͩ ɾϐϯ ɾϒϨουϘʔυ ɾδϟϯύʔϫΠϠʔ ɾRaspberryPi3 or RaspberryPi4 ̑8ϖʔδ

  59. LνΧͱԹ౓ଌఆͰ͖·͔ͨ͠ʁ ࣭໰̐ Go to www.menti.com and use the code 39

    13 24 6 ̑9ϖʔδ
  60. ࠓ೔ͷײ૝Λͻͱ͜ͱೖྗ͍ͩ͘͞ ࣭໰̑ Go to www.menti.com and use the code 57

    14 61 4 60ϖʔδ
  61. https://www.raspberrypi.org/documentation/pico/ getting-started/ RaspberryPi ͷαΠτΛ։͖·͢ MicroPythonͷofficial guideΛೖख͠·͢ 61ϖʔδ

  62. MicroPythonͷofficial guideΛೖख͠·͢ ̒̎ϖʔδ

  63. MicroPythonͷλϒΛεΫϩʔϧ͠·͢ɻ ίίΛΫϦοΫʂ ̒̏ϖʔδ

  64. MicroPythonͷofficial guideΛೖख͠·͢ Buy nowΛ ΫϦοΫʂ ̒̐ϖʔδ

  65. MicroPythonͷofficial guideΛೖख͠·͢ Free DownloadΛ ΫϦοΫʂ ̒̑ϖʔδ

  66. MicroPythonͷofficial guideΛೖख͠·͢ Free PDFΛ ΫϦοΫʂ PDFΛμ΢ϯϩʔυ Ͱ͖ͨΒΫϦοΫͯ͠ ։͍͍ͯͩ͘͞ɻ ̒̒ϖʔδ

  67. MicroPythonͷofficial guideΛೖख Ͱ͖·ͨ͠ ̒̓ϖʔδ

  68. ࿩୊ͷRaspberryPi PicoͰMicroPythonΛ࢖ͬͯ༡΅͏ʂ ✨ ✨ ✨ ͝ࢹௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ʂ ̒̔ϖʔδ