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
ofserial-option
Search
Hideaki Tai
December 13, 2015
Programming
0
88
ofserial-option
ofSerialで実装されていないシリアル制御のオプションを拡張
Hideaki Tai
December 13, 2015
Tweet
Share
More Decks by Hideaki Tai
See All by Hideaki Tai
Matter を Remo nano ではじめよう
hideakitai
0
2.8k
ファームウェアの Panic を 自動で収集・解析・分類・集計して 市場品質の改善サイクルを回す
hideakitai
1
1.5k
Other Decks in Programming
See All in Programming
ISUCON研修おかわり会 講義スライド
arfes0e2b3c
1
460
なぜ適用するか、移行して理解するClean Architecture 〜構造を超えて設計を継承する〜 / Why Apply, Migrate and Understand Clean Architecture - Inherit Design Beyond Structure
seike460
PRO
3
790
テスト駆動Kaggle
isax1015
1
510
「テストは愚直&&網羅的に書くほどよい」という誤解 / Test Smarter, Not Harder
munetoshi
0
190
システム成長を止めない!本番無停止テーブル移行の全貌
sakawe_ee
1
220
AIエージェントはこう育てる - GitHub Copilot Agentとチームの共進化サイクル
koboriakira
0
620
MCPを使ってイベントソーシングのAIコーディングを効率化する / Streamlining Event Sourcing AI Coding with MCP
tomohisa
0
160
The Modern View Layer Rails Deserves: A Vision For 2025 And Beyond @ RailsConf 2025, Philadelphia, PA
marcoroth
2
670
AIと”コードの評価関数”を共有する / Share the "code evaluation function" with AI
euglena1215
1
180
おやつのお供はお決まりですか?@WWDC25 Recap -Japan-\(region).swift
shingangan
0
140
レベル1の開発生産性向上に取り組む − 日々の作業の効率化・自動化を通じた改善活動
kesoji
0
270
猫と暮らす Google Nest Cam生活🐈 / WebRTC with Google Nest Cam
yutailang0119
0
160
Featured
See All Featured
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.7k
KATA
mclloyd
30
14k
How to train your dragon (web standard)
notwaldorf
96
6.1k
Building an army of robots
kneath
306
45k
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.5k
Reflections from 52 weeks, 52 projects
jeffersonlam
351
21k
Rails Girls Zürich Keynote
gr2m
95
14k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.4k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
Balancing Empowerment & Direction
lara
1
440
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.9k
GraphQLとの向き合い方2022年版
quramy
49
14k
Transcript
ϋʔυ͞ΜͱoF ofSerialͷ௨৴ΦϓγϣϯΛઃఆ͢Δ ୄ 2015.12.13
ϋʔυΣΞͱ௨৴͢Δͱݴ͑ γϦΞϧ௨৴Ͱ͢ΑͶ
γϦΞϧ௨৴େ͖Ͱ͢ΑͶʁ
ઌ͜ΜͳͭΛ࡞ͬͨͷͰ͕͢ɺɺɺ
ϞʔλυϥΠόͱ௨৴Ͱ͖ͳ͍
֬ೝͯ͠Έͨͱ͜Ζɺɺɺ • ύϦςΟνΣοΫ͕ۮͰೖͬͯΔʂ • oFઃఆ͠Α͏ʂ
None
͋Εɺɺɺ·͔͞ɺɺɺ Φϓγϣϯ͕ઃఆͰ͖ͳ͍ʂ
γϦΞϧͷΦϓγϣϯͱ දతͳͷɺϘʔϨʔτҎ֎ͩͱɺ • ύϦςΟ":"None,"Even,"Odd • ετοϓϏοτ":"1,"2 • σʔλϏοτ":"5,"6,"7,"8 • ϑϩʔ੍ޚ"(DTR)":"ON,"OFF
ͳͲ
Α͘͏IoTܥʁͷ(ͬ͞ͱ͑Δ)ػثͳΒɺ • ύϦςΟ":"None"(~PARENB) • ετοϓϏοτ":"1 • σʔλϏοτ":"8 • ϑϩʔ੍ޚ"(DTR)":"NONE ͱ͔ʹͳ͍ͬͯΔ
ࢀߟจݙ • γϦΞϧϙʔτͰ༡΅͏ • γϦΞϧ௨৴ͷجૅࣝ"#"RS#232C"/"RS#422"/"RS#485"
oFͰ͍ͬͯΔγϦΞϧͷϥΠϒϥϦ • TERMIOS)(LINUXඪ४ͷλʔϛφϧ੍ޚΠϯλϑΣʔεΈ͍ͨ) • ຊޠͷManPage
͜ͷΜ͍͡Ε͍͍ͬΆ͍
֦ுͯ͠Έ·ͨ͠ class ofxSerial : public ofSerial { void setParity(parity p);
void setStopBits(stop_bits s); void setDataBits(data_bits d); };
ςετͯ͠Έ·͠ΐ͏ ͱΓ͋͑ͣArduinoઌੜͰ
ArduinoઌੜͰ͜Μͳײ͡Ͱఆٛ͞Εͯͨ
ͯ͜ͱͰɺ͜Μͳײ͡Ͱॻ͚OK void setup() { Serial.begin(9600, SERIAL_8E2); // ϘʔϨʔτͱΦϓγϣϯͷઃఆ } void
loop() { while (Serial.available()) { Serial.print("got message! : "); Serial.println((int)Serial.read()); } }
γϦΞϧ௨৴࠷ߴʂ γϦΞϧ௨৴ͭΒ͍
ͱΓ͋͑ͣެ։ • ͪ͜Βɿh#ps:/ /gist.github.com/hideakitai/ b4eb28a4ee8b04d3cce0 • ofxSerial͍ͬͯ͏ଞϥΠϒϥϦΛͬͨͭ • ϝϯς͞Εͯͳ͍༷Ͱͬͨ͜ͱແ͍Ͱ͢
ࠓޙ • El$CapitanͷγϦΞϧɺFTDIυϥΠόௐࢠѱ͍ʁΊͪΌॏ ͍ɻɻɻௐࠪதɻɻɻ
Ҏ্