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

初心者、電子工作に入門。 Python Charity Talks 2021.09 / A b...

北䑓如法
September 11, 2021

初心者、電子工作に入門。 Python Charity Talks 2021.09 / A beginner started electronic handicraft - Python Charity Talks 2021.09

Python Charity Talks in Japan 2021.09 https://pyconjp.connpass.com/event/218154/
で「すごい広島 with Python」チームの発表の中で
電子工作初心者のわしが電子工作に入門したことを説明したものです。

Python Charity Talks / A beginner started electronic handicraft -

北䑓如法

September 11, 2021
Tweet

More Decks by 北䑓如法

Other Decks in Technology

Transcript

  1. ιϑτ΢ΣΞ PROGRAM ϋʔυ΢ΣΞ CPU ϝϞϦ Ճ଎౓ηϯα GPS δϟΠϩηϯα εΫϦʔϯ GPU

    όε Networking Χϝϥ ؾѹܭ ۙ઀ηϯα όε όε όε ྫ͑͹J1IPOFΞϓϦ͸ॻ͚Δ͕ʜʜ Θ͠
  2. ιϑτ΢ΣΞ PROGRAM ϋʔυ΢ΣΞ CPU ϝϞϦ Ճ଎౓ηϯα GPS δϟΠϩηϯα εΫϦʔϯ GPU

    όε Networking Χϝϥ ؾѹܭ ۙ઀ηϯα όε όε όε ྫ͑͹J1IPOFΞϓϦ͸ॻ͚Δ͕ʜʜ ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Θ͠
  3. ങͬͨ΋ͷ 1.ʲI-11396ʳRGBΠϧϛωʔγϣϯϑϧΧϥʔLED OST1MA58K1B Ձ֨:ˇ40 × ਺ྔ:1 = ߹ܭ:ˇ40 2.ʲI-12167ʳRGBϑϧΧϥʔLED 5mm

    OSTAMA5B31A ΞϊʔυίϞϯ Ձ֨:ˇ50 × ਺ྔ:1 = ߹ܭ:ˇ50 3.ʲI-11577ʳ3mm੺৭LED 625nm 70౓ OSR5JA3Z74A Ձ֨:ˇ10 × ਺ྔ:5 = ߹ܭ:ˇ50 4.ʲI-11578ʳ3mm੨৭LED 470nm 70° OSB5YU3Z74A Ձ֨:ˇ20 × ਺ྔ:4 = ߹ܭ:ˇ80 5.ʲI-11637ʳ3mmԫ྘৭LED 570nm 70౓ OSG8HA3Z74A Ձ֨:ˇ10 × ਺ྔ:5 = ߹ܭ:ˇ50 6.ʲI-09851ʳ3mmന৭LED LEBWL34A06AA00 Ձ֨:ˇ10 × ਺ྔ:5 = ߹ܭ:ˇ50 7.ʲI-11639ʳ3mmԫ৭LED 590nm 70౓ OSY5JA3Z74A Ձ֨:ˇ20 × ਺ྔ:3 = ߹ܭ:ˇ60 8.ʲI-12605ʳ5mm੺৭LED 625nm OSR5JA5E34B Ձ֨:ˇ10 × ਺ྔ:5 = ߹ܭ:ˇ50 9.ʲI-11985ʳ5mm੨྘৭LED 505nm OSBG5111A Ձ֨:ˇ20 × ਺ྔ:1 = ߹ܭ:ˇ20 10.ʲR-25101ʳΧʔϘϯ఍߅(୸ૉൽບ఍߅) 1/4W100Ω (100ຊೖ) Ձ֨:ˇ100 × ਺ྔ:1 = ߹ܭ:ˇ100 (1ାͷ৔߹͸ˇ100ԁ/2ାҎ্ͷ৔߹͸୯Ձˇ90ԁ) 11.ʲR-25181ʳΧʔϘϯ఍߅(୸ૉൽບ఍߅) 1/4W180Ω (100ຊೖ) Ձ֨:ˇ100 × ਺ྔ:1 = ߹ܭ:ˇ100 (1ାͷ৔߹͸ˇ100ԁ/2ାҎ্ͷ৔߹͸୯Ձˇ90ԁ) 12.ʲR-25221ʳΧʔϘϯ఍߅(୸ૉൽບ఍߅) 1/4W220Ω (100ຊೖ) Ձ֨:ˇ100 × ਺ྔ:1 = ߹ܭ:ˇ100 (1ାͷ৔߹͸ˇ100ԁ/2ାҎ্ͷ৔߹͸୯Ձˇ90ԁ) 13.ʲR-25331ʳΧʔϘϯ఍߅(୸ૉൽບ఍߅) 1/4W330Ω (100ຊೖ) Ձ֨:ˇ100 × ਺ྔ:1 = ߹ܭ:ˇ100 (1ାͷ৔߹͸ˇ100ԁ/2ାҎ্ͷ৔߹͸୯Ձˇ90ԁ) 14.ʲR-25102ʳΧʔϘϯ఍߅(୸ૉൽບ఍߅) 1/4W1kΩ (100ຊೖ) Ձ֨:ˇ100 × ਺ྔ:1 = ߹ܭ:ˇ100 (1ାͷ৔߹͸ˇ100ԁ/2ାҎ্ͷ৔߹͸୯Ձˇ90ԁ) 15.ʲP-00327ʳి஑ϘοΫε ୯3×2ຊ ϦʔυઢɾεΠον෇ Ձ֨:ˇ70 × ਺ྔ:1 = ߹ܭ:ˇ70 16.ʲI-05886ʳCdSηϧ(1MΩ)GL5528(4ݸೖ) Ձ֨:ˇ100 × ਺ྔ:1 = ߹ܭ:ˇ100 17.ʲT-03639ʳ͸Μͩٵऔث GS-108 Ձ֨:ˇ1,100 × ਺ྔ:1 = ߹ܭ:ˇ1,100 18.ʲT-02537ʳ͸Μͩͯ͜୆ ST-11 Ձ֨:ˇ730 × ਺ྔ:1 = ߹ܭ:ˇ730 19.ʲP-12031ʳ0.96Πϯν 128×64υοτ༗ػELσΟεϓϨΠ(OLED) ന৭ Ձ֨:ˇ580 × ਺ྔ:1 = ߹ܭ:ˇ580 20.ʲP-14435ʳ༗ػELσΟεϓϨΠ 0.95Πϯν 96×64υοτ RGB Ձ֨:ˇ1,280 × ਺ྔ:1 = ߹ܭ:ˇ1,280 21.ʲC-04398ʳࡉϐϯϔομ 1×20 Ձ֨:ˇ20 × ਺ྔ:5 = ߹ܭ:ˇ100 (1ݸͷ৔߹͸ˇ20ԁ/10ݸҎ্ͷ৔߹͸୯Ձˇ18ԁ) 22.ʲT-14456ʳ͸Μͩͯ͝ FX600-02 Ձ֨:ˇ4,200 × ਺ྔ:1 = ߹ܭ:ˇ4,200 23.ʲC-05159ʳϒϨουϘʔυɾδϟϯύʔϫΠϠ(Φε-Φε)ηοτ ֤छ ߹ܭ60ຊҎ্ Ձ֨:ˇ220 × ਺ྔ:1 = ߹ܭ:ˇ220 24.ʲK-15232ʳKXTC9-2050࢖༻3࣠Ճ଎౓ηϯαϞδϡʔϧ Ձ֨:ˇ500 × ਺ྔ:1 = ߹ܭ:ˇ500 25.ʲK-04912ʳখܕѹిৼಈδϟΠϩϞδϡʔϧ Ձ֨:ˇ400 × ਺ྔ:1 = ߹ܭ:ˇ400 26.ʲM-08761ʳϚΠΫϩαʔϘ9g SG-90 Ձ֨:ˇ400 × ਺ྔ:1 = ߹ܭ:ˇ400 27.ʲP-05155ʳϛχϒϨουϘʔυ BB-601(ന) Ձ֨:ˇ130 × ਺ྔ:1 = ߹ܭ:ˇ130 (1ݸͷ৔߹͸ˇ130ԁ/2ݸҎ্ͷ৔߹͸୯Ձˇ120ԁ) 28.ʲP-00315ʳϒϨουϘʔυ EIC-801 Ձ֨:ˇ270 × ਺ྔ:1 = ߹ܭ:ˇ270 29.ʲK-16149ʳRaspberry Pi Pico ϕʔγοΫηοτ Ձ֨:ˇ730 × ਺ྔ:1 = ߹ܭ:ˇ730
  4. - ιϑτ΢ΣΞ͸MicroPython - ύιίϯʹ Thonny ͱ͍͏ΞϓϦΛೖΕΔ →→ - Raspberry Pi

    Pico ͱ ύιίϯʹUSBͰͭͳ͙ɻ - Thonny ͔ΒίʔυΛॻ͍࣮ͯߦ ιϑτ΢ΣΞ෦෼ Raspberry Pi Pico ύιίϯͷUSB ϓϩάϥϜΛೖΕΔ
  5. - GPIO (general purpose input/output) - ͜ͷαʔϘϞʔλ͸ύϧε৴߸Λड͚ͯɺ֯౓ΛมԽͤ͞Δ αʔϘ͸(1*0ʹܨ͍Ͱ੍ޚ from machine

    import PWM, Pin import utime servo = PWM(Pin(0)) servo.freq(50) max_duty = 65025 deg_m90 = 0.025 # -90 deg deg_0 = 0.0725 # 0 deg deg_p90 = 0.12 # +90 deg def rot(deg): servo.duty_u16(int(max_duty*((deg/90.0)*(deg_p90-deg_0)+deg_0))) while True: rot(0.0) utime.sleep(0.5) rot(-40.0) ... ←)[ͷύϧεʹઃఆͯ͋͠Δ
  6. Θ͠ ϋʔυ΢ΣΞ ιϑτ΢ΣΞ CPU ϝϞϦ Ճ଎౓ηϯα GPS δϟΠϩηϯα εΫϦʔϯ GPU

    όε Networking Χϝϥ ؾѹܭ ۙ઀ηϯα όε όε όε PROGRAM
  7. Θ͠ ϋʔυ΢ΣΞ ιϑτ΢ΣΞ CPU ϝϞϦ Ճ଎౓ηϯα GPS δϟΠϩηϯα εΫϦʔϯ GPU

    όε Networking Χϝϥ ؾѹܭ ۙ઀ηϯα όε όε όε PROGRAM \\ ͪΐͬͱΘ͔Δ // Raspberry Pi Pico