Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
M5UnifiedとPicoRubyで楽しむM5シリーズ
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Katsuhiko Kageyama
November 29, 2025
Technology
530
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
M5UnifiedとPicoRubyで楽しむM5シリーズ
Katsuhiko Kageyama
November 29, 2025
More Decks by Katsuhiko Kageyama
See All by Katsuhiko Kageyama
PicoRuby as a Multi-VM Operating System
kishima
1
440
PCとPicoRuby-ESP32間でシリアルファイル転送
kishima
1
51
Rubyでmicro-ROS!
kishima
0
160
mruby(PicoRuby)で ファミコン音楽を奏でる2
kishima
1
210
mruby(PicoRuby)で ファミコン音楽を奏でる
kishima
2
780
PicoRuby/R2P2で自分だけのコンピュータを作ろう
kishima
1
610
mrubyと micro-ROSが繋ぐロボットの世界
kishima
3
1.1k
わたしのRubyKaigi Effect
kishima
2
260
思い出の技術書 F-BASICの世界
kishima
0
52
Other Decks in Technology
See All in Technology
『三匹の子ぶた』から学ぶネットワークセキュリティの昔と今 / Network Security: Then and Now Through the Lens of The Three Little Pigs
nttcom
1
6.2k
Agent 時代の Kaggle 展望 / kaggle-in-the-agentic-era
upura
1
780
JavaScript 研修 (2026)
recruitengineers
PRO
2
590
名刺メーカーDevグループ 紹介資料
sansan33
PRO
0
1.2k
ソフトウェアサプライチェーンの構造的リスクとコンテナ環境の保護
kyohmizu
4
350
Master Dataグループ紹介資料
sansan33
PRO
1
4.8k
TypeScript入門 2026
recruitengineers
PRO
3
640
【CEDEC2026】『Relink』を拡張せよ - 『GRANBLUE FANTASY: Relink - Endless Ragnarok』の開発速度と品質を守るCI運用
cygames
PRO
0
190
修正PRを食べてレビュースキルが賢くなる:Claude Codeによる自己改善サイクル
yuyaumetsu
6
1.6k
Webアクセシビリティ入門 2026
recruitengineers
PRO
3
620
Digitization部 紹介資料
sansan33
PRO
2
7.7k
案件に一番詳しいAIを Amazon Bedrock AgentCore で作る ― 知見が知見を生むチームへ / Compounding Knowledge with AgentCore
yusukeshimizu
1
110
Featured
See All Featured
The untapped power of vector embeddings
frankvandijk
2
1.8k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.4k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
430
The Invisible Side of Design
smashingmag
301
52k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
270
Navigating Weather and Climate Data
rabernat
0
480
BBQ
matthewcrist
89
10k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.6k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Navigating Team Friction
lara
192
16k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
430
Transcript
M5Unifiedと PicoRubyで楽しむ M5シリーズ
@kishima 組み込み系エンジニア プレイングマネージャ業 mruby好き 電子工作好き 2
2025の流行りはPicoRuby Ruby x マイコンが熱い
PicoRubyとESP32とM5Stack PicoRubyは元々、Raspberry Pi Pico がター ゲット @YuuuさんがESP32へ対応 ESP32を使ったM5Stackという 製品がある
我が家のM5シリーズ(の一部)
M5のなやみ ▸ きれいにまとまったデバイスでかわいい ▸ ふつうはC++で開発 ▸ M5のC++ライブラリを使えば、簡単に画面 描画などもできる ▸ PicoRubyだと自分で
C++ライブラリを叩く mrbgemを実装必要!
M5Stack向けのライブラリをgem化しよう • 標準ライブラリ(M5Unified/M5GFX) ◦ 画面描画 ◦ LED ◦ ボタン ◦
電源 ◦ IMU ◦ スピーカー ◦ マイク ◦ etc https://docs.m5stack.com/ja/arduino/m5unified/helloworld
たくさんのメソッド 描画系(M5GFX)だけで100個以上! バインディングを書く必要あり void drawPixel ( int32_t x, int32_t y,
const T& color) void drawCircle ( int32_t x, int32_t y, int32_t r, const T& color) … … … さすがに無理・・・
どうやって実装するか CだとFFIが使えるが・・・ ※FFI:Foreign Function Interface Cなどの関数を違う言語から直接呼ぶ仕組み マイコン環境で使うことが難しい・・・ 今回は、Claude Codeにやらせた
実装 1. 実装対象の関数をC++ヘッダからスクリプト で抽出 2. 抽出した結果をYAMLにまとめる 3. YAMLからmrubyバインディングのスケルト ン関数を生成 4.
スケルトン関数を段階的に実装 作業量が多いので、そのままではAIでも対応できない ◆実装方針
中間生成物のYAML
現在の結果 描画系 99/180 メソッドを実装 - M5Unified Core: 20/20 (100%) ✅
- M5GFX Color: 12/12 (100%) ✅ - M5GFX Draw: 30/30 (100%) ✅ - M5GFX Fill: 3/13 (23%) - M5GFX Text: 9/31 (29%) - M5GFX Image: 2/13 (15%) - M5GFX Display: 9/29 (31%) - M5GFX Low-level: 4/18 (22%) - M5GFX Utility: 0/13 (0%) https://github.com/kishima/picoruby-m5unified/tree/main
できたので、色々動かしてみる 我が家のM5から以下を試す • M5Stack • M5StickC Plus2
こんな感じで
同じコードで動かせる
課題 AIですべて実装できたとしても、200を超えるメ ソッドを継続的にメンテするのは難しい・・・ Ruby-FFI的な仕組みが必要