Suche senden
Hochladen
Osc愛媛FTDriver
•
Als KEY, PDF herunterladen
•
1 gefällt mir
•
1,740 views
ksk sue
Folgen
【訂正】p.5のMicrobridgeの「給電 スマホ→デバイス」の項目が○になっていますが正しくは☓です。Microbridgeはデバイス→スマホの給電になります。
Weniger lesen
Mehr lesen
Technologie
Melden
Teilen
Melden
Teilen
1 von 9
Jetzt herunterladen
Empfohlen
イチからはじめるUSB Host API
イチからはじめるUSB Host API
ksk sue
Ireland
Ireland
Hermina000
B.m.e.m.p.
B.m.e.m.p.
jozefjozsef
Problem solving 101
Problem solving 101
Rodney Williams
Modular home floor designs and the general contractor's responsibilities
Modular home floor designs and the general contractor's responsibilities
Home Builder
Emotions ( colours )
Emotions ( colours )
AndresDante
Bio Data - 1
Bio Data - 1
Keerthi Wijisundara Jayasinhe
Slideshare & scribd
Slideshare & scribd
jozefjozsef
Empfohlen
イチからはじめるUSB Host API
イチからはじめるUSB Host API
ksk sue
Ireland
Ireland
Hermina000
B.m.e.m.p.
B.m.e.m.p.
jozefjozsef
Problem solving 101
Problem solving 101
Rodney Williams
Modular home floor designs and the general contractor's responsibilities
Modular home floor designs and the general contractor's responsibilities
Home Builder
Emotions ( colours )
Emotions ( colours )
AndresDante
Bio Data - 1
Bio Data - 1
Keerthi Wijisundara Jayasinhe
Slideshare & scribd
Slideshare & scribd
jozefjozsef
GEM: How does it work?
GEM: How does it work?
shuttl
Bep tu-thong-minh
Bep tu-thong-minh
Linh Phuong
Skype
Skype
Laura Wheelock
Bep tu-xach-tay-tu-duc
Bep tu-xach-tay-tu-duc
Linh Phuong
4 elements
4 elements
Maria Motamedi
Evaluation part 1
Evaluation part 1
fionapearce
You can do it
You can do it
Rodney Williams
Lysende på sosiale media
Lysende på sosiale media
kineju
Modular Home Floor Designs and the General Contractor's Responsibilities
Modular Home Floor Designs and the General Contractor's Responsibilities
Home Builder
All words in English
All words in English
Dwarakanath Tatipigari
Bep tu-xach-tay-tu-duc
Bep tu-xach-tay-tu-duc
Linh Phuong
Evaluation part 2
Evaluation part 2
fionapearce
Weitere ähnliche Inhalte
Andere mochten auch
GEM: How does it work?
GEM: How does it work?
shuttl
Bep tu-thong-minh
Bep tu-thong-minh
Linh Phuong
Skype
Skype
Laura Wheelock
Bep tu-xach-tay-tu-duc
Bep tu-xach-tay-tu-duc
Linh Phuong
4 elements
4 elements
Maria Motamedi
Evaluation part 1
Evaluation part 1
fionapearce
You can do it
You can do it
Rodney Williams
Lysende på sosiale media
Lysende på sosiale media
kineju
Modular Home Floor Designs and the General Contractor's Responsibilities
Modular Home Floor Designs and the General Contractor's Responsibilities
Home Builder
All words in English
All words in English
Dwarakanath Tatipigari
Bep tu-xach-tay-tu-duc
Bep tu-xach-tay-tu-duc
Linh Phuong
Evaluation part 2
Evaluation part 2
fionapearce
Andere mochten auch
(12)
GEM: How does it work?
GEM: How does it work?
Bep tu-thong-minh
Bep tu-thong-minh
Skype
Skype
Bep tu-xach-tay-tu-duc
Bep tu-xach-tay-tu-duc
4 elements
4 elements
Evaluation part 1
Evaluation part 1
You can do it
You can do it
Lysende på sosiale media
Lysende på sosiale media
Modular Home Floor Designs and the General Contractor's Responsibilities
Modular Home Floor Designs and the General Contractor's Responsibilities
All words in English
All words in English
Bep tu-xach-tay-tu-duc
Bep tu-xach-tay-tu-duc
Evaluation part 2
Evaluation part 2
Osc愛媛FTDriver
1.
FTDriver
Androidとマイコンをつなげよう ✦ FTDriver ✦ USB-シリアル変換チップの Android用ドライバ ✦ 言語:Java ✦ Githubで公開中 https://github.com/ksksue 秋月 FTDI USBシリアル変換モジュール
2.
使ってもらった例 ガイガーカウンタとAndroidタブレット 海外:ヘリコプター用コントローラを
XBee経由でつなげてみたよ! Galaxy Nexusと繋げたよ! (@yakagawa さん) これからヘリゲームつくるよ!
3.
FTDriver設計にいたるまで ✦
Android 3.1からUSBプログラミングができる ようになったよ! ✦ みんなが持ってるマイコンとAndroidが繋がると 面白いんじゃない? ✦ マイコンと言えばUSBシリアル!でもUSBシリ アルドライバがないじゃないか・・・ ✦ よしつくろう
4.
他の接続方法との違いは? ✦
でもちょっとまてよ。。。 USBシリアルじゃなくてもAndroidとマイコンと繋げる方 法はあるよね? ✦ ADK ✦ Microbridge ✦ Wi-Fi ✦ Bluetooth ✦ これらとどうちがうの?
5.
Androidと外部デバイスとの接続方法一覧
USBシリアル ADK MicroBridge Wi-Fi Bluetooth (FTDriver) すべてのバージョ どんなマイコンと ポイント Google公式! ンのAndroidと繋 高速無線! お手軽P2P無線! も繋がる! がる! 有線/無線 有線 有線 有線 無線 無線 給電 ⃝ ☓ ⃝ ☓ ☓ スマホ→デバイス 115200bps 転送レート (bitbang mode ? ? 54Mbps 19200bps 200Mbps) 消費電力 小 中 中 大 大 マイコン+ マイコン+ Arduino+USBホ Arduino+USBホ マイコン+ デバイス Bluetooth FTDIモジュール ストシールド ストシールド Wi-Fiモジュール モジュール デバイス一式価格 ¥3,500∼ ¥5,000∼ ¥5,000∼ ¥7,000∼ ¥6,000∼ 設計難易度 低 低 高 高 中 Android 3.1以上 2.3.4以上 すべて すべて すべて 対応バージョン USBシリアルがAndroid-マイコン接続の選択肢として十分アリ
6.
FTDriverを使った Android
Android-マイコン構成例 while(true) { ユーザプログラム ... len = mSerial.read(rbuf,0); ... } FTDriver シリアル通信をポーリング USB Host API begin(int baudrate); read(byte[] buf, int channel); (Android Frameworks) write(byte[] buf, int length, int channel); end(); Arduino ライクなシンプルなインタフェース マイコンボード USB通信 FTDI チップ シリアル通信 マイコン マイコンボードとAndroidをUSBで接続
7.
FTDriverを使った
シリアル通信プログラミング (readするだけのカンタンな例) 1.インスタンス生成 mSerial = new FTDriver((UsbManager)getSystemService(Context.USB_SE RVICE)); 2.デバイスオープンとボーレート設定 mSerial.begin(9600) 3.リードポーリング(スレッド) byte[] rbuf = new byte[4096]; ... while(true) { ... len = mSerial.read(rbuf); ... } 4.デバイスクローズ mSerial.end();
8.
FTDriver内の処理概要
(アプリ開発者は手をつけなくておk) 1.初期化:USBホストのエンドポイントを オープンする mEndpointIN = intf.getEndpoint(0); mEndpointOUT = intf.getEndpoint(1); intf : USB Interface インスタンス 2.オープンしたエンドポイントを叩く int length = mDeviceConnection.bulkTransfer(mEndpointIN, mReadbuf, mReadbuf.length,0); // RX int length = mDeviceConnection.bulkTransfer(mEndpointOUT, write_buf, write_size, 0); // TX USBバルク転送でエンドポイントINとエンドポイントOUTを叩く
9.
最後に githubからPull Request大歓迎
✦ これまでの開発協力者 https://github.com/ksksue ✦ @titoi2 ✦ @yishii ✦ @yakagawa ✦ @darkukll ✦ @zaki50 ✦ 他 FTDriverをBitbangモードへ対応 ソースコード提供(@yishii) 使ってみたよ or 開発してみたよ Twitter ID @ksksue などあれば気軽にメンションください
Hinweis der Redaktion
\n
\n
\n
\n
\n
\n
\n
\n
\n
Jetzt herunterladen