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
90
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.9k
ファームウェアの Panic を 自動で収集・解析・分類・集計して 市場品質の改善サイクルを回す
hideakitai
1
1.5k
Other Decks in Programming
See All in Programming
知っているようで知らない"rails new"の世界 / The World of "rails new" You Think You Know but Don't
luccafort
PRO
1
140
テストカバレッジ100%を10年続けて得られた学びと品質
mottyzzz
2
590
1から理解するWeb Push
dora1998
7
1.9k
AI Coding Agentのセキュリティリスク:PRの自己承認とメルカリの対策
s3h
0
210
ぬるぬる動かせ! Riveでアニメーション実装🐾
kno3a87
1
220
アプリの "かわいい" を支えるアニメーションツールRiveについて
uetyo
0
270
ソフトウェアテスト徹底指南書の紹介
goyoki
1
150
Laravel Boost 超入門
fire_arlo
3
210
Tool Catalog Agent for Bedrock AgentCore Gateway
licux
6
2.4k
Navigation 2 を 3 に移行する(予定)ためにやったこと
yokomii
0
210
FindyにおけるTakumi活用と脆弱性管理のこれから
rvirus0817
0
510
Deep Dive into Kotlin Flow
jmatsu
1
340
Featured
See All Featured
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Thoughts on Productivity
jonyablonski
70
4.8k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
30
9.7k
Why You Should Never Use an ORM
jnunemaker
PRO
59
9.5k
Build your cross-platform service in a week with App Engine
jlugia
231
18k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.5k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.5k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Context Engineering - Making Every Token Count
addyosmani
2
41
Into the Great Unknown - MozCon
thekraken
40
2k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.1k
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υϥΠόௐࢠѱ͍ʁΊͪΌॏ ͍ɻɻɻௐࠪதɻɻɻ
Ҏ্