Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
高専キャリア冬イベ2024LT ~Bluetooth入門~
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
プラナリア
December 28, 2024
240
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
高専キャリア冬イベ2024LT ~Bluetooth入門~
高専キャリア冬イベント2024 で発表したBluetoothの表面をさらったスライドです。
Bluetoothや処理の流れをなんとなく書いています。
プラナリア
December 28, 2024
More Decks by プラナリア
See All by プラナリア
高専キャリア2024gw交流会_未踏ジュニアに応募した話について
pranaria
0
310
Featured
See All Featured
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.1k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
69
66k
Six Lessons from altMBA
skipperchong
29
4.5k
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.2k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.6k
How to build a perfect <img>
jonoalderson
1
6k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Site-Speed That Sticks
csswizardry
13
1.5k
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
4
1.2k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
12k
Transcript
None
アジェンダ 1. 自己紹介 2. コンテストの御礼 3. Bluetoothの概要 4. Bluetoothの処理順序 5.
Bluetoothのここがいい 6. Bluetoothのここがしたい 7. 楽しいのでやってみよう 1
2 知念 栄樹(ちねん えいじゅ) 沖縄高専メディア情報工学科 Twitter: @pranaria9 最近のこと: パソコン甲子園モバイル部門グランプリ 所属(?):
みらいスタジオ インターン
関係者の皆様、ありがとうございました!! 無事、パソコン甲子園モバイル部門で グランプリを取ることができました!! 3
今回話すこと: 4 Bluetoothの概要
5 短距離でデバイス同士が接続できる 無線通信の規格のこと Bluetoothってそもそもなんぞ?
6 Bluetooth 前提知識 Bluetooth Classic Bluetooth LowEnergy
7 BluetoothClassicの概要 通信方式 ストリーム バッテリー 5.0Mbps 音声といった大きいデータを送信する
8 BluetoothLowEnergyの概要 通信方式 ストリーム バッテリー 10Kbps ビットといった小さいデータを送信する
8 セントラル (受信側) ペリフェラル (送信側)
9 ※ペリフェラル BluetoothClassicの処理(Arduino->Androidの場合) ※セントラル オブジェクト初期化 送信データの作成 SerialBT.printlnで データを送信する Bluetooth有効化 デバイススキャン
inputStreamから 値を取得 アダプタの取得
10 BluetoothLowEnergyの処理(Arduino->Androidの場合) ※ペリフェラル デバイス名設定 ペリフェラルサーバの インスタンス作成 キャラクタリスティック をサービスに追加 キャラクタリスティック の値を初期化
サービスUUIDをサービス に追加 キャラクタリスティック に値を設定
10 BluetoothLowEnergyの処理(Arduino->Androidの場合) ※セントラル デバイススキャン Adapterからデバイスを 取得 Gattサーバに接続 BroadCastで結果を通知 Intentの値で接続が成功 しているかを確認する
Notificationで通知を 有効化 Read関数で初期値を取得 コールバック関数から ペリフェラルの値を取得
12 ・お手軽無線通信が楽しい
13 ・マイコンとPCがあれば簡単に検証できる ・Arduinoでお手軽開発 ・一対一通信で幸せに始められる お手軽無線通信
14 ・複数機対1機の通信処理が難しい ・処理がたまによく不安定になる
15 複数機対1機の通信処理が難しい ・非同期処理をなんとなく書くと死ぬ ・コンテスト開発期間でn敗 ・基礎知識がつかないときつい ・ヘルパー関数は偉大
16 処理がたまによく不安定になる ・ Wi-fiと周波数帯が被っているため回線干渉する ・コンテスト当日に接続処理が動かなくなることがあった => 絶望、無事デスマーチ
17 なんだかんだ楽しいのでやってみよう! ドキュメント長いけど慣れると簡単
None