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
WxBeacon2の気象データをAmbientに定期的にUPする
Search
Kenichi Yoshida
July 31, 2017
Technology
1.5k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
WxBeacon2の気象データをAmbientに定期的にUPする
LT「WxBeacon2の気象データをAmbientに定期的にUPする」の発表資料です。
Kenichi Yoshida
July 31, 2017
More Decks by Kenichi Yoshida
See All by Kenichi Yoshida
[ハンズオン資料]Ozobot Bitによるプログラミング的思考育成
kyoshida
1
720
JAWS-FESTA 東海道 2016にてSORACOM Beamハンズオン補足資料
kyoshida
0
170
Other Decks in Technology
See All in Technology
PHPカンファレンス関西の招待状 / Invitation to PHP Conference Kansai
ykanoh
0
210
自作バイナリを動かす「入口」8選
puhitaku
2
1.3k
DGX Spark でどこまでハッキングができるのか?
kash1064
3
1.4k
ブラウザとサーバーから考えるAI時代のフロントエンド監視
shogo4131
3
1k
AI導入は済んだ。次は統制を作り替える番だ_AI×開発組織 Summit 2026
techtekt
PRO
0
350
Post AI時代のリファクタリング実践記 / Refactoring in the post AI era
kaminashi
1
280
今さら理解するウェブフォントver.2026
takanorip
3
900
Persisting Massive Data with Rails ~Designing for 60 billion rows, and fighting the bottlenecks~ Railsで挑む大量データ永続化 〜600億件を永続化するための設計とボトルネックとの戦い〜
occhi
0
740
Running Kotlin + Quarkus with Lambda
nealle
1
4k
二歩目のフロントエンド・ウェブアクセシビリティ
camiha
2
660
Metadata - Section 1: HTML Basics
mohab1
0
120
Tofu-Controller lightning talk @ Containerday 2026
gionn
0
120
Featured
See All Featured
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.9k
Building Applications with DynamoDB
mza
96
7.2k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.7k
Into the Great Unknown - MozCon
thekraken
41
2.8k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
580
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
1k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
300
Git: the NoSQL Database
bkeepers
PRO
433
67k
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
380
Chasing Engaging Ingredients in Design
codingconduct
0
360
Transcript
WxBeacon2の気象データを Ambientに定期的にUPする 吉⽥研⼀
⾃⼰紹介 • 吉⽥研⼀ なんと50歳になってしまった。 • ECCコンピュータ専⾨学校 ⾮常勤講師 • iOS/Xcode/Swift週1・2コマ •
Rubyとか週1・2コマ • ラズパイ3でPython 2.7 週1・2コマ • キッズプログラミング教室8x9(はっく) • ⼩学⽣向け Scratch 週1・2コマ • 私⽴⾼校のプログラミング授業 週1・4時間 • キャスタリア株式会社 • プログラミング教育 Ozobot⽇本正規代理店
昨年1年ほどIoT関連の企業に • その縁で、短期集中型起業プログラム『GVH Startup Camp』 の講師をしています。 • 約3ヶ⽉間で起業に必要なチームづくりと、実践的な知識をイ チから学び、ビジネスアイデアを具現化する起業プログラム。
本題 • 「WxBeacon2の気象データをAmbientに定期的にUPする」 • WxBeacon2(ウェザービーコン2)とは? • ウェザーニュース社が、販売しているBluetooth簡易気象観測器
WxBeacon2は販売中です。 • じつは1週間で届く!6⽉、7⽉の知り合い実績
iOS/Androidアプリで8種のセンサー データを取得できる • 天候アプリweathernewsに内蔵されて いる • 気温、湿度、照度、紫外線指数、気圧、 騒⾳、不快指数、熱中症危険度
実はオムロンの環境センサーのC向け • B向けだと割⾼(1個9,800円 40個からで4,950円 @chip1stop)
BLE接続なんで他のアプリでもイケる筈 • Kazuyuki Eguchi⽒のQiita & github http://qiita.com/KazuyukiEguchi/items/32c6497496923783fa53 https://github.com/KazuyukiEguchi/WxBeacon2-Read
8種のセンサーデータをAmbientに • IoT⽤シンプルサービス「Ambient」(アンビエント) • https://ambidata.io/
Ambientの特⾊=WxBeacon2にマッチ • 1度のpostデータ(JSON)で8つのデータを送信できる
Gistにて公開 • https://gist.github.com/yoshidaken1/10bb1c601d242665e6a438b01ab4c348
本⽇のデモ環境 • WxBeacon2 ー Macbook(node.js実⾏)ー Ambient ←Raspberry Pi 3などが適している
BLE接続概要 • nobelパッケージでBLE接続 UUIDは固定値(任意のサービスに準じる任意の値) discoverイベントでペリフェラル(≒BLEデバイス)を利⽤
サービスがUUIDと⼀致すれば、センサーデータを取り出す
Ambient接続概要 • ambient-libパッケージでAmbient接続
接続ー切断時にAmbient#sendメソッドで送信 ⾮同期接続なので接続終了の処理を気をつける。
接続結果 Ambientによる HTTPステータスコード 200 はOK(Success) 403はNG(Forbidden) アクセス拒否(短時間に送信し た時に出る) nobleによる 8種類のセンサーデータ
温度、湿度、照度、UV指数、 気圧、騒⾳、不快指数、熱中症 危険度
定期的な接続 • crontabで3分おきなどに実⾏ • Ambientは送信間隔が短いと、403エラー(アクセス拒否)を出す
公開チャンネル https://ambidata.io/ch/channel.html?id=1716
公開チャンネル https://ambidata.io/ch/channel.html?id=1716
WxBeacon2の気象データを Ambientに定期的にUPする ご静聴ありがとうございました!!