Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
M5UnifiedとPicoRubyで楽しむM5シリーズ
Search
Katsuhiko Kageyama
November 29, 2025
Technology
660
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
同人誌とVMづくり
kishima
1
65
Tab5をRubyで動くパソコンにする
kishima
2
450
Family mrubyの進捗
kishima
1
160
PicoRuby as a Multi-VM Operating System
kishima
1
560
PCとPicoRuby-ESP32間でシリアルファイル転送
kishima
1
64
Rubyでmicro-ROS!
kishima
0
230
mruby(PicoRuby)で ファミコン音楽を奏でる2
kishima
1
290
mruby(PicoRuby)で ファミコン音楽を奏でる
kishima
2
870
PicoRuby/R2P2で自分だけのコンピュータを作ろう
kishima
1
850
Other Decks in Technology
See All in Technology
[re:Invent2026事前勉強会(有志開催)]続きは、ラスベガスの廊下で / continue-in-the-vegas-hallway
sh_fk2
0
510
kaonavi Tech Night#2
kaonavi
0
110
複雑な業務システムを高速でつくるため、チーム全員をつくれる人へ
ayakurabuchi
0
130
レガシーコードに対する loop engineering的なAI開発プロセス導入について
kubell_hr
0
190
バックオフィスに染み出すTypeScript ── clasp で安全に仕組みを作る
nealle
1
180
AIエージェント統制はAPIから——押さえるべき5つの要素
nagix
0
120
慶應義塾大学 AI実践05 論文執筆の仕組み化
keio_smilab
PRO
6
3.6k
IBC 2026 動画技術関連レポート / IBC 2026 Report
cyberagentdevelopers
PRO
2
170
WireGuard for Apache NuttX - Bringing Secure Remote Access to embedded Devices -
aki310ooooo
0
140
FinOpsを導入してマルチプロダクトのコスト最適化を実現する
kworkdev
PRO
0
120
AIエージェントの監視、思考を見るか行動を見るか / Monitoring AI Agents: Thoughts or Actions
yusukeshimizu
1
120
公共システムAdventCalendar2026
toru_kubota
0
150
Featured
See All Featured
Accessibility Awareness
sabderemane
1
290
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
3
3.9k
How GitHub (no longer) Works
holman
316
150k
Six Lessons from altMBA
skipperchong
29
4.6k
Fashionably flexible responsive web design (full day workshop)
malarkey
409
67k
Design in an AI World
tapps
1
380
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.4k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
How to make the Groovebox
asonas
2
2.5k
How Software Deployment tools have changed in the past 20 years
geshan
2
35k
Done Done
chrislema
187
17k
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的な仕組みが必要