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
Katsuhiko Kageyama
November 29, 2025
Technology
510
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
400
PCとPicoRuby-ESP32間でシリアルファイル転送
kishima
1
50
Rubyでmicro-ROS!
kishima
0
150
mruby(PicoRuby)で ファミコン音楽を奏でる2
kishima
1
190
mruby(PicoRuby)で ファミコン音楽を奏でる
kishima
2
760
PicoRuby/R2P2で自分だけのコンピュータを作ろう
kishima
1
540
mrubyと micro-ROSが繋ぐロボットの世界
kishima
3
1.1k
わたしのRubyKaigi Effect
kishima
2
250
思い出の技術書 F-BASICの世界
kishima
0
51
Other Decks in Technology
See All in Technology
クラウドファンディング版StackChan 3体(4体)をインタラクティブな体験型作品にして展示もした話 / スタックチャンお誕生日会2026
you
PRO
0
270
技術・能力を向上する原理原則 #きのこセッションa #きのこ2026
bash0c7
0
190
AWS Blocks を触ってみた/first-tach-aws-blocks
fossamagna
2
110
LiDAR SLAMの実装とセンサ融合 ~Lie群からContinuous-Time LIOまで~
naokiakai
1
790
Fabricをフル活用する AI Agent Hub -製造業特化AIエージェントの設計
iotcomjpadmin
0
180
小さいから、全部わかる。— 常駐AI "xangi" のすすめ
sugupoko
0
220
Kotlin 開発のツラミを爆破した話! / Explode the difficulty of Kotlin dev!
eller86
0
130
IaC コードを資産へ:AWS CDK 社内ライブラリと横断展開 / aws-summit-japan-2026
gotok365
10
1.7k
Oracle Exadata Database Service on Cloud@Customer X11M (ExaDB-C@C) サービス概要
oracle4engineer
PRO
2
8.3k
Zenoh on Zephyr on LiteX
takasehideki
2
170
Foundry Toolkit + Lemonade Serverでローカルワークフロー開発
seosoft
0
120
フロントエンドイチゲキ実装 ― Figmaデザインと画面設計書からAIに実装・テストを書かせるための”下ごしらえ” / 20260627 Yusuke Mazuka
shift_evolve
PRO
0
120
Featured
See All Featured
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
190
The SEO identity crisis: Don't let AI make you average
varn
0
510
Why Our Code Smells
bkeepers
PRO
340
58k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.5k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.2k
Evolving SEO for Evolving Search Engines
ryanjones
0
230
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
490
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
250
Test your architecture with Archunit
thirion
1
2.3k
Documentation Writing (for coders)
carmenintech
77
5.4k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
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的な仕組みが必要