cocoa study 11/27 #43
DESCRIPTION
TRANSCRIPT
![Page 1: Cocoa Study 11/27 #43](https://reader033.vdocuments.pub/reader033/viewer/2022051816/545ccb87b0af9f12318b4ac9/html5/thumbnails/1.jpg)
ハードウェア系Cocoa プログラマ
です。Yusuke Ito, at Cocoa勉強会 #43
110年11月27日土曜日
![Page 2: Cocoa Study 11/27 #43](https://reader033.vdocuments.pub/reader033/viewer/2022051816/545ccb87b0af9f12318b4ac9/html5/thumbnails/2.jpg)
Profile
• いとう ゆうすけ
• Twitter: @novi_
• 高専卒
• 長野県出身
210年11月27日土曜日
![Page 3: Cocoa Study 11/27 #43](https://reader033.vdocuments.pub/reader033/viewer/2022051816/545ccb87b0af9f12318b4ac9/html5/thumbnails/3.jpg)
しごと• ベンチャー企業 Lindoc Inc. 所属
• 電子書籍・電子教科書を作っている
• iOS開発・デザイン・営業担当
• PDF Reference を読む毎日
• PDF周りの解析、描画エンジンの作成
310年11月27日土曜日
![Page 4: Cocoa Study 11/27 #43](https://reader033.vdocuments.pub/reader033/viewer/2022051816/545ccb87b0af9f12318b4ac9/html5/thumbnails/4.jpg)
構成要素• 言語:
C/Objective-C >>>>||>> 日本語 >> English
• UNIXの勉強を色々(OS, Kernel)
• オブジェクト指向・デザインパターン
• UI・デザイン関係の勉強
• 八苦(Hack) 何でも
410年11月27日土曜日
![Page 5: Cocoa Study 11/27 #43](https://reader033.vdocuments.pub/reader033/viewer/2022051816/545ccb87b0af9f12318b4ac9/html5/thumbnails/5.jpg)
その2• マイコン(ARM, AVR)とか、FPGAとか、回路作ったり
• オーディオ(ヘッドホン・イヤホン、HPA・DAC、自作がメイン)
• ビデオ撮り・編集 (学生時代の活動)
510年11月27日土曜日
![Page 6: Cocoa Study 11/27 #43](https://reader033.vdocuments.pub/reader033/viewer/2022051816/545ccb87b0af9f12318b4ac9/html5/thumbnails/6.jpg)
プログラミング歴
• そもそもプログラミング自体: 5年位
• Cocoa: 4年位 (Tigerから)
• iOS歴: 3年位
• 1.1.4時代: SDK前から
20102005
もともと、回路・ハード系
610年11月27日土曜日
![Page 7: Cocoa Study 11/27 #43](https://reader033.vdocuments.pub/reader033/viewer/2022051816/545ccb87b0af9f12318b4ac9/html5/thumbnails/7.jpg)
せっかくなので...
710年11月27日土曜日
![Page 8: Cocoa Study 11/27 #43](https://reader033.vdocuments.pub/reader033/viewer/2022051816/545ccb87b0af9f12318b4ac9/html5/thumbnails/8.jpg)
アプリの紹介をちょっと
810年11月27日土曜日
![Page 9: Cocoa Study 11/27 #43](https://reader033.vdocuments.pub/reader033/viewer/2022051816/545ccb87b0af9f12318b4ac9/html5/thumbnails/9.jpg)
TweetParakeet
• iPad専用Twitterクライアント
• 公式が出る前は結構よかったが...
• 基本は高機能クライアント
• 変な機能、満載!!
• フォントが変えられる!!
910年11月27日土曜日
![Page 10: Cocoa Study 11/27 #43](https://reader033.vdocuments.pub/reader033/viewer/2022051816/545ccb87b0af9f12318b4ac9/html5/thumbnails/10.jpg)
SimpleCamera
• iPhone 4 ユーザー用
• 露出とフォーカスが個別に調整できる
• ホワイトバランスと露出の固定
• 簡易手ブレ補正
• 位置情報(GPS)埋め込みとExif対応
1010年11月27日土曜日
![Page 11: Cocoa Study 11/27 #43](https://reader033.vdocuments.pub/reader033/viewer/2022051816/545ccb87b0af9f12318b4ac9/html5/thumbnails/11.jpg)
本題
1110年11月27日土曜日
![Page 12: Cocoa Study 11/27 #43](https://reader033.vdocuments.pub/reader033/viewer/2022051816/545ccb87b0af9f12318b4ac9/html5/thumbnails/12.jpg)
iPadでワンセグチューナーを使ってみた。
From “Make: Tokyo Meeting 06”
#mtm061210年11月27日土曜日
![Page 13: Cocoa Study 11/27 #43](https://reader033.vdocuments.pub/reader033/viewer/2022051816/545ccb87b0af9f12318b4ac9/html5/thumbnails/13.jpg)
ことのはじまり
1) iPadにはUSBポートが付いている(Camera Connection Kit)
2) オーディオインターフェースも使えるらしい
3) USB Flashメモリも使えるらしい (要JB)
4) じゃあ、USBデバイスが使えるんじゃね ??
1310年11月27日土曜日
![Page 14: Cocoa Study 11/27 #43](https://reader033.vdocuments.pub/reader033/viewer/2022051816/545ccb87b0af9f12318b4ac9/html5/thumbnails/14.jpg)
Mac用のプログラムを移植してみる
• 接続したUSB機器のProductID
とVenderID・文字列を取得するプログラム
• これから使うプログラムはMac
で動作確認済み 11410年11月27日土曜日
![Page 15: Cocoa Study 11/27 #43](https://reader033.vdocuments.pub/reader033/viewer/2022051816/545ccb87b0af9f12318b4ac9/html5/thumbnails/15.jpg)
お。
1510年11月27日土曜日
![Page 16: Cocoa Study 11/27 #43](https://reader033.vdocuments.pub/reader033/viewer/2022051816/545ccb87b0af9f12318b4ac9/html5/thumbnails/16.jpg)
2
実際にデバイスからデータを送ってみる
• EZ-USB を使用
• USBホスト(iPad・Mac)とやりとりしてLEDなどを点灯することができるボード。
1610年11月27日土曜日
![Page 17: Cocoa Study 11/27 #43](https://reader033.vdocuments.pub/reader033/viewer/2022051816/545ccb87b0af9f12318b4ac9/html5/thumbnails/17.jpg)
LEDMaciPad
EZUSBUSB
これも、できた!
(画像ありません、スミマセン...)
つまり、ドライバさえ書けば使える!!
1710年11月27日土曜日
![Page 18: Cocoa Study 11/27 #43](https://reader033.vdocuments.pub/reader033/viewer/2022051816/545ccb87b0af9f12318b4ac9/html5/thumbnails/18.jpg)
3
いよいよ、チューナーを...
• Macで動くドライバを作ってから移植
• 取り込みは簡単であったが、そこからが面倒だった(後述)
1810年11月27日土曜日
![Page 19: Cocoa Study 11/27 #43](https://reader033.vdocuments.pub/reader033/viewer/2022051816/545ccb87b0af9f12318b4ac9/html5/thumbnails/19.jpg)
おー、動いたー。やったね!
1910年11月27日土曜日
![Page 20: Cocoa Study 11/27 #43](https://reader033.vdocuments.pub/reader033/viewer/2022051816/545ccb87b0af9f12318b4ac9/html5/thumbnails/20.jpg)
概要
• チューナーはLOG-J200を使用
• プロトコルは解析されている↑これ以外は基本使えない
• IOKit・VLCライブラリを使用
• JBの必要無し (iOS 4.2は不明)
2010年11月27日土曜日
![Page 21: Cocoa Study 11/27 #43](https://reader033.vdocuments.pub/reader033/viewer/2022051816/545ccb87b0af9f12318b4ac9/html5/thumbnails/21.jpg)
IOKit 自前 VLCライブラリ
USBドライバ
TSパケット生成
ムービー再生
※UI部分以外はMacと全く同じ
2110年11月27日土曜日
![Page 22: Cocoa Study 11/27 #43](https://reader033.vdocuments.pub/reader033/viewer/2022051816/545ccb87b0af9f12318b4ac9/html5/thumbnails/22.jpg)
IOKit 自前 VLCライブラリ
USBドライバ
TSパケット生成
ムービー再生
• TSパケットを取り込み (IOKit)
• TSパケットを生成・整形
• VLCにそのまま流し込む
• 再生はVLCが全部やってくれる
2210年11月27日土曜日
![Page 23: Cocoa Study 11/27 #43](https://reader033.vdocuments.pub/reader033/viewer/2022051816/545ccb87b0af9f12318b4ac9/html5/thumbnails/23.jpg)
まとめ• iPadなら認証プログラム無しにUSBデバイスが使える
• Storeの審査に通るのかは不明(多分無理だと思われ...)
• JB無しで出来る
• ハードウェアと通信出来る、最も簡単で最も高速(480Mbps)な方法
• iOS 4.2 からは CoreMIDIがあるのでそっちを使う(ただし、速度は出ない38kbps)
2310年11月27日土曜日
![Page 24: Cocoa Study 11/27 #43](https://reader033.vdocuments.pub/reader033/viewer/2022051816/545ccb87b0af9f12318b4ac9/html5/thumbnails/24.jpg)
Thank you !!
これからも、ハードウェアとソフトウェアの間の ネタ
を発掘していきます。
2410年11月27日土曜日
![Page 25: Cocoa Study 11/27 #43](https://reader033.vdocuments.pub/reader033/viewer/2022051816/545ccb87b0af9f12318b4ac9/html5/thumbnails/25.jpg)
資料
• Blog: http://novis.jimdo.com/
• MTM06 PDF: http://bit.ly/dXY99a
• github: https://github.com/novi
2510年11月27日土曜日