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

PicoRuby から始めるたのしい電子工作

ogom
September 09, 2023

PicoRuby から始めるたのしい電子工作

PicoRuby から始めるたのしい電子工作

Osaka RubyKaigi 03
2023.09.09

Enjoy Ruby electronic programming !

ogom

September 09, 2023
Tweet

More Decks by ogom

Other Decks in Programming

Transcript

  1. PicoRuby ͔Β࢝ΊΔ


    ͨͷ͍͠ిࢠ޻࡞
    Osaka RubyKaigi 03


    2023.09.09

    View full-size slide

  2. ඌ࿜ ੝ ʢ͓͝΋Γ ͔ͨ͠ʣ
    BouqueTecגࣜձࣾɿ୅දऔక໾


    ݱ৔ίʔνɺσʔλϞσϦϯά


    ̏DϞσϦϯάɺϊϕϧςΟ੍࡞

    View full-size slide

  3. ओ࠵ऀͷίϛϡχςΟ
    Rubyؔ੢ɿ୅දʢ̏୅໨ʣ


    naniwa.rbɿओ࠵ʢݩDDD.rbʣ


    CoderDojo େࡕڱࢁɿνϟϯϐΦϯ


    OSS Gate Osakaɿαϙʔλʔ


    Rails Girls OsakaɿΦʔΨφΠβ


    ςΫϊਤ޻෦ɿ෭෦௕

    View full-size slide

  4. ࠓ೥ͷ׆ಈ
    CoderDojo େࡕڱࢁɿ ຖ݄։࠵


    ୈ90ճ Rubyؔ੢ ษڧձɿओ࠵


    Maker Faire Kyoto 2023ɿεϙϯαʔɺग़ల


    TechSeeker Hackathon 2023ɿϝϯλʔ


    TechSeeker Collection 2023ɿεϙϯαʔɺग़ల


    ςΫϊਤ޻෦ɿϫʔΫγϣοϓ


    DojoCon Japan 2023ɿ࣮ߦҕһ


    େࡕRubyձٞ 03ɿ࣮ߦҕһɺεϙϯαʔɺग़లɺొஃ

    View full-size slide

  5. ిࢠ޻࡞
    ిࢠ޻࡞͸ɺిࢠ෦඼΍൒ಋମૉࢠΛ༻͍ͨ޻࡞ͷ͜ͱ


    ೖྗ෦඼ɿεΠονʢਓ͕ૢ࡞ʣɺηϯαʔʢपғΛௐ΂Δʣ


    ग़ྗ෦඼ɿLEDʢਓʹ఻͑ΔʣɺϞʔλʔʢԿ͔Λಈ͔͢ʣ

    View full-size slide

  6. mruby
    mruby ͸ɺRubyݴޠͷܰྔ࣮૷Ͱ૊ΈࠐΈγεςϜʹར༻


    ίϯύΠϧ͕ඞཁͳͷͰ؀ڥߏங΍ར༻ํ๏͕खؒ


    όΠφϦΛϚΠίϯʹૹ৴ɺ࣮ߦ͢ΔΤσΟλΛ࡞ͬͨ

    View full-size slide

  7. PicoRuby
    PicoRuby ͸ɺmrubyͷܰྔ࣮૷Ͱ૊ΈࠐΈγεςϜʹར༻


    ϫϯνοϓϚΠίϯͰಈ࡞͢ΔͷͰ؀ڥߏங͕؆୯


    ϑΝΠϧΛυϥοάˍυϩοϓ͢Δ͚ͩͰ࣮ߦͰ͖Δ

    View full-size slide

  8. R2P2 ͷ LνΧ
    R2P2 (Ruby on Raspberry Pi Pico) ͸ɺϚΠίϯͷ࣮ߦ؀ڥ


    ϓϩάϥϛϯάͷ hello, world ͸ɺిࢠ޻࡞Ͱ͸ LνΧ


    screen ίϚϯυͷγϦΞϧ௨৴ͰϓϩάϥϛϯάͰ͖Δ

    View full-size slide

  9. PRK Firmware ͷ RGBLED
    PRK Firmware͸ɺDIY ΩʔϘʔυ ϑΝʔϜ΢ΣΞ ϑϨʔϜϫʔΫ


    RGBLED(ϑϧΧϥʔLED) Ͱ͸ RGB Matrix ΋αϙʔτ


    ϚΠίϯͷPR2040Ͱಈ࡞͠ɺϚ΢εͳͲͷ੍ޚͰ͖Δ

    View full-size slide

  10. ిࢠ޻࡞ ͷ αΠίϩ
    Ruby͸ɺΦϒδΣΫτࢦ޲εΫϦϓτݴޠͰΫϥεΛར༻


    ͍ͭ΋ͷΫϥε΍ϝιουͰϓϩάϥϛϯά͕Ͱ͖Δ


    Dice Ϋϥε ͷ turn ϝιου ͰαΠίϩ͕ৼΒΕΔ

    View full-size slide

  11. PicoRuby ͷ υΩϡϝϯτ
    PicoRuby͸ɺυΩϡϝϯτͷ੔උ͕͋·ΓਐΜͰ͍ͳ͍


    v0.9.21 ͔Β GPIO ΍ ADC ͳͲͷΫϥε͕औΓೖΕΒΕͯ

    ͦΕ·ͰͷυΩϡϝϯτ͕ݹ͘ͳͬͨ


    8݄ʹPicoRubyͷυΩϡϝϯτܭըͷΩοΫΦϑ͕͋Γ

    RBS ϑΝΠϧΛى఺ʹυΩϡϝϯτΛ৽͍ͨ͘͠͠


    ৽ϦϑΝϨϯεϚχϡΞϧܭը࢝ಈ

    υΩϡϝϯτͷϝϯόʔΛืूதʂ

    View full-size slide

  12. Ruby Ͱͨͷ͍͠ిࢠ޻࡞
    ిࢠ޻࡞͸ɺਖ਼ղͷͳֶ͍ͼͰ ͨͷ͍͠


    RubyͷϓϩάϥϛϯάͰΨϯϓϥ΋ޫΒͤΔ


    PicoRubyͰͨͷ͍͠ిࢠ޻࡞Λ࢝Ί·͠ΐ͏

    View full-size slide

  13. PicoRuby Follow-up Osaka
    PRK FirmwareͰɺࣗ࡞ΩʔϘʔυΛ૊ΈཱͯΔΠϕϯτΛ։࠵


    ։࠵೔ɿ2023೥10݄28೔ (౔༵೔)


    ձ৔ɿ γϦίϯϋ΢ε ڞཱిࢠ࢈ۀ ηϛφʔϧʔϜ

    View full-size slide

  14. Enjoy Ruby electronic programming !

    View full-size slide