這個 app 的功能很單純, 就是會偵測特定的 iBeacon 訊號 (UUID), 然後根據 Major/Minor 的值, 顯示不同的畫面來. 看擷圖比較清楚.
(1) App icon
(2) 啟動畫面 (Launch Image)
印章文字分別是萊恩大兵, 鋼鐵人實作聯盟和口丁工作室.
(3) 偵測主畫面 (依訊號強弱會有不同的圖示)
(4) 捕捉畫面
有三種神獸, 分別是皮卡丘, 傑尼龜和妙蛙種子.
(5) 支援 ANCS (Apple Notification Center Service)
這隻 iOS app 的程式碼已上傳到 Github_GoGoPrivateRyan/iBeaconSensor, 大家請自行取用.
程式碼的詳細解說可參考文章尾的連結, 萊恩大兵這邊僅列一下這隻 iOS app 有用到技術與關鍵字, 方便有興趣的朋友 google-ing.
[程式碼 關鍵字]
(1) Add CoreLocation framework support
(2) Background mode
- Location updates
- Uses Bluetooth LE as accessory
(3) UITableView, UINavigationController, Prototype Cell, Segue, UIImage,
(4) Has LaunchImage and AppIcon
(5) Set Device Orientation to Portrait mode only
(6) Pass beacon data (major, minor) to different view
(7) Support Apple Notification Center Service in iOS 8
最後提醒一下, 這隻 iOS app 得開啟通知與定位服務才能正常運作.
平常不用時, 得把這些設定關掉, 會比較省電.
開發這隻 iOS app 的過程中, 萊恩大兵遇到一個問題還解決不了~ 不會改 project name 或檔名.
萊恩大兵有找過資料或作法, 但總是會遇到編譯失敗的問題. 如果有人知道解法, 再請分享給萊恩大兵. 謝謝.
[iOS app 開發 參考資料]
* Tutorial: iBeacon App Development with CoreLocation on Apple iOS 7/8
* iOS Programming 101: Customize UITableView and UITableViewCell Background using Storyboard
[萊恩大兵的其它文章]
自製大四軸
* 自製大四軸, 實作分享@華山文創園區
* 自製大四軸, (1) 零組件篇, 遙控器 (Drone, Quadcopter, Futaba, Maker, Arduino, Animatronic Eye)
* 自製大四軸, (2) 零組件篇, 飛控板 (Drone, Quadcopter, MultiWii, Arduino, Futaba, Maker)
* 自製大四軸, (3) 零組件篇, 自行雷切木質機架 (Drone, Quadcopter, Maker, Laser Cut)
* 自製大四軸, (4) 零組件篇, 馬達與電變調整 (Drone, Quadcopter, Maker, Electric Speed Control, Motor)
* 自製大四軸, (5) 組裝篇, 四軸飛行器成形 (Drone, Quadcopter, MultiWii, Arduino, Maker, Electric Speed Control, Motor)
* 自製大四軸, (6) 調整篇, 飛行前兩三事 (Drone, Quadcopter, Maker, Futaba, Arduino, MultiWii)
* 自製大四軸, (7) 充電篇, iMax B6 充電器操作記要 (Charger, Battery)
* 自製大四軸, (8) 問題篇, 機架損壞維修 (Drone, Quadcopter, Laser Cut)
* 自製大四軸, (9) 改良篇, 方便拆卸的木質機架 (Drone, Quadcopter, Maker, Laser Cut)
* 自製大四軸, (10) 外飛篇, 新手的青蛙跳與遛狗 (Drone, Quadcopter, Maker, MultiWii)
自動報球速的棒球
* 自動報球速的棒球, (1) 概念與雛形 (Arduino, MPU-6050, HC-06)
* 自動報球速的棒球, (2) 第一版試作品 (Arduino, NanoWii, microSD, MPU6050)
* 自動報球速的棒球, (3) 拋接實驗的數據分析 (Arduino, NanoWii, microSD, MPU6050)
* 自動報球速的棒球, (2) 第一版試作品 (Arduino, NanoWii, microSD, MPU6050)
* 自動報球速的棒球, (3) 拋接實驗的數據分析 (Arduino, NanoWii, microSD, MPU6050)
* 做實驗, 寫入 EEPROM 的速度能否跟得上 MPU6050 的數據產出? (Arduino, MPU-6050, EEPROM)
* 筆記, NanoWii, 一些經驗分享 (Arduino, NanoWii, MPU6050)
* Murmur, 很小很強大的穿戴式裝置模組 (Realtag, Bluetooth, CC2540, MPU6050, BMP180)
* 筆記, NanoWii, 一些經驗分享 (Arduino, NanoWii, MPU6050)
* Murmur, 很小很強大的穿戴式裝置模組 (Realtag, Bluetooth, CC2540, MPU6050, BMP180)
CC2540 Bluetooth Low Energy
* 筆記, CC2540 Bluetooth Low Energy, (1) 開發環境 架設 (Bluetooth, CC2540)
* 筆記, CC2540 Bluetooth Low Energy, (2) 跑第一個範例程式 (Bluetooth, CC2540)
* 筆記, CC2540 Bluetooth Low Energy, (3) SimpleBLEPeripheral 簡單介紹 (Bluetooth, CC2540)
* 筆記, CC2540 Bluetooth Low Energy, (4) 在智慧手機上執行範例程式 (Bluetooth, CC2540)
* 筆記, CC2540 Bluetooth Low Energy, (5) 偵測與發送 iBeacon 訊號 (Bluetooth, CC2540, iBeacon)
* 實作, iBeacon 發訊器 x 防丟器 (Bluetooth, CC2540, iBeacon)
* 實作, iBeacon 尋寶遊戲 (Bluetooth, CC2540, iBeacon, iOS app)
* 實作, BLE + iOS app, 遙控燈泡君 (Bluetooth, CC2540, iOS app)
* 做實驗, 用 iBeacon 做自動控制的可行性 (Bluetooth, iBeacon, CC2540, Automation, URL Scheme, iOS app)
* 筆記, CC2540 Bluetooth Low Energy, (2) 跑第一個範例程式 (Bluetooth, CC2540)
* 筆記, CC2540 Bluetooth Low Energy, (3) SimpleBLEPeripheral 簡單介紹 (Bluetooth, CC2540)
* 筆記, CC2540 Bluetooth Low Energy, (4) 在智慧手機上執行範例程式 (Bluetooth, CC2540)
* 筆記, CC2540 Bluetooth Low Energy, (5) 偵測與發送 iBeacon 訊號 (Bluetooth, CC2540, iBeacon)
* 實作, iBeacon 發訊器 x 防丟器 (Bluetooth, CC2540, iBeacon)
* 實作, iBeacon 尋寶遊戲 (Bluetooth, CC2540, iBeacon, iOS app)
* 實作, BLE + iOS app, 遙控燈泡君 (Bluetooth, CC2540, iOS app)
* 做實驗, 用 iBeacon 做自動控制的可行性 (Bluetooth, iBeacon, CC2540, Automation, URL Scheme, iOS app)
OpenCV 學習路徑
* 記錄, OpenCV 學習路徑, (1) 環境安裝與第一個範例 (OpenCV, Python)
* 記錄, OpenCV 學習路徑, (2) 辨識多邊形 (OpenCV, Python)
* 記錄, OpenCV 學習路徑, (3) 人臉辨識 (OpenCV, Python, Face Recognition)
小惡魔 無線溫度感測器
* 小惡魔, (1) 溫度感測 + 物聯網 (Electric Imp, Xively, LM35, Internet of Things)
* 小惡魔, (2) 溫度感測 + 物聯網 + 事件觸發 (Electric Imp, Xively, LM35, Internet of Things)
* 小惡魔, (2) 溫度感測 + 物聯網 + 事件觸發 (Electric Imp, Xively, LM35, Internet of Things)
108 大眼仔
Plot Clock
* 體驗, 蛋生音互動裝置@兒童美術館 (Arduino, 3D Printing, HC-SR04, Interactive)
* 實作, 電容感應音樂樹
* 修理, 樂高馬達 8883 (LEGO 8883 Power Functions M-Motor)
* 修理, (part 2) 樂高馬達 8883 (LEGO 8883 Power Functions M-Motor)
* 修理, 液晶螢幕 (LCD)
* 108 大眼仔, 初登場 (Arduino, SG-90, Maker Faire Taipei 2014, Animatronic Eye)
* 108 大眼仔, 進化, (1) 專屬程式庫 (Arduino, SG90, Animatronic Eye)
* 108 大眼仔, 進化, (2) 當我們串在一起 (Arduino, SG90, Animatronic Eye, I2C)
* 108 大眼仔, 進化, (3) 檢查 Gmail 信箱 (Arduino, SG90, Animatronic Eye, Temboo)
* 108 大眼仔, 進化, (4) 看著我的臉 (Arduino, SG90, Animatronic Eye, OpenCV, Processing, I2C)
* 108 大眼仔, 進化, (5) 迎著人來人往 (Arduino, SG90, Animatronic Eye, OpenCV, Processing, I2C)
* 108 大眼仔, 檢討筆記, 我要一個打十個 (Arduino, SG90, Animatronic Eye)
* 108 大眼仔, 進化, (1) 專屬程式庫 (Arduino, SG90, Animatronic Eye)
* 108 大眼仔, 進化, (2) 當我們串在一起 (Arduino, SG90, Animatronic Eye, I2C)
* 108 大眼仔, 進化, (3) 檢查 Gmail 信箱 (Arduino, SG90, Animatronic Eye, Temboo)
* 108 大眼仔, 進化, (4) 看著我的臉 (Arduino, SG90, Animatronic Eye, OpenCV, Processing, I2C)
* 108 大眼仔, 進化, (5) 迎著人來人往 (Arduino, SG90, Animatronic Eye, OpenCV, Processing, I2C)
* 108 大眼仔, 檢討筆記, 我要一個打十個 (Arduino, SG90, Animatronic Eye)
* 自造 Time Plotting Clock, (1) 零件採購
* 自造 Time Plotting Clock, (2) 組裝
* 自造 Time Plotting Clock, (3) 校正
* 自造 Time Plotting Clock, (2) 組裝
* 自造 Time Plotting Clock, (3) 校正
* Murmur, 有趣的零件售價
* Murmur, Arduino 保險桿 (Arduino, bumper, 3D printing)
* Murmur, 許一個 maker 分享網站
* Murmur, 物聯網新概念- The Physical Web (Internet of Things, The Physical Web)
* Murmur, 關於 HP Sprout 的一點想法
* Murmur, 說中文很難嗎? (Toy, Reed Switch, Voice Recorder Module)
* Murmur, 停車場自動繳費機的兩三事 (Kiosk)
* Murmur, 為什麼是 WiFi? 關於小米空氣清淨器的一點看法.. (Internet of Things)
* Murmur, 機器人是時尚元素? (Robot, Fashion)
* Murmur, Nordic 才會是 Bluetooth LE 晶片戰爭的恐龍王者? (Bluetooth, Nordic)
* Murmur, Maker Faire Taipei 2015, 讓人印象深刻的創作品 (Maker Faire Taipei)
* Murmur, 自造智慧眼鏡 (3D Printing, Smart Glasses)
* 體驗, 原住民互動故事書@宜蘭大同鄉泰雅生活館* Murmur, Arduino 保險桿 (Arduino, bumper, 3D printing)
* Murmur, 許一個 maker 分享網站
* Murmur, 物聯網新概念- The Physical Web (Internet of Things, The Physical Web)
* Murmur, 關於 HP Sprout 的一點想法
* Murmur, 說中文很難嗎? (Toy, Reed Switch, Voice Recorder Module)
* Murmur, 停車場自動繳費機的兩三事 (Kiosk)
* Murmur, 為什麼是 WiFi? 關於小米空氣清淨器的一點看法.. (Internet of Things)
* Murmur, 機器人是時尚元素? (Robot, Fashion)
* Murmur, Nordic 才會是 Bluetooth LE 晶片戰爭的恐龍王者? (Bluetooth, Nordic)
* Murmur, Maker Faire Taipei 2015, 讓人印象深刻的創作品 (Maker Faire Taipei)
* Murmur, 自造智慧眼鏡 (3D Printing, Smart Glasses)
* 體驗, 蛋生音互動裝置@兒童美術館 (Arduino, 3D Printing, HC-SR04, Interactive)
* 開箱, 鋼彈小劇場 (Pepper's Ghost, GUNDAM)
* 開箱, Flying Alien Sphere 異形飛球 (Drone, Flying Alien Sphere)
* 開箱, 偉力控二號機, 小四軸飛行器 (CG022, Quadcopter)
* 偉力控二號機, 修理防護罩與飛行心得 (CG022, Quadcopter)
* 偉力控二號機, 我想有個家 (CG022, Quadcopter)
* 偉力控二號機, 換馬達 (CG022, Quadcopter)
* 偉力控二號機, 盒子上的洞 (CG022, Quadcopter)
* 開箱, Flying Alien Sphere 異形飛球 (Drone, Flying Alien Sphere)
* 開箱, 偉力控二號機, 小四軸飛行器 (CG022, Quadcopter)
* 偉力控二號機, 修理防護罩與飛行心得 (CG022, Quadcopter)
* 偉力控二號機, 我想有個家 (CG022, Quadcopter)
* 偉力控二號機, 換馬達 (CG022, Quadcopter)
* 偉力控二號機, 盒子上的洞 (CG022, Quadcopter)
* 筆記, microSD 模組, 一些經驗分享 (Arduino, microSD)
* 筆記, 低電壓警報器的用法 (Low Voltage Buzzer)
* 筆記, 應用 OpenCV 做目標捕獲 (OpenCV, Python)
* 筆記, 低電壓警報器的用法 (Low Voltage Buzzer)
* 筆記, 應用 OpenCV 做目標捕獲 (OpenCV, Python)
* 實作, Arduino 聲納雷達 (HC-SR04, SG90)
* 豈止於大, 謝銠鈑的鋁罐燈 (Arduino, MAX7219, LED)
* 實作, 偽 3D 立體顯示器 (Pepper's Ghost)
* 豈止於大, 謝銠鈑的鋁罐燈 (Arduino, MAX7219, LED)
* 實作, 偽 3D 立體顯示器 (Pepper's Ghost)
* 修理, 樂高馬達 8883 (LEGO 8883 Power Functions M-Motor)
* 修理, (part 2) 樂高馬達 8883 (LEGO 8883 Power Functions M-Motor)
* 修理, 液晶螢幕 (LCD)
* 想修理, 免治馬桶座的薄膜按鍵開關
* 想拆, 聲控錄音變聲熊本熊 (Kumamon, Vibration Motor, VOX)
* 想拆, 小七的無線充電座 (Wireless Charging, 7-11)
* 拆, 電流急急樂
* 拆, 無線光學滑鼠
* 拆, 元宵節紙雕小燈籠燈芯 (7-color blinking LED)
* 拆, 堅若磐石手電筒
* 拆, 省電燈泡 (Compact Fluorescent Bulb)
* 拆, 玩具吸塵器 (toy, step motor, vibration motor)
* 拆, USB 車用充電器 (USB Car Charger)
* 拆, 震動發光充氣加油棒 (LED, vibration switch)
* 想拆, 聲控錄音變聲熊本熊 (Kumamon, Vibration Motor, VOX)
* 想拆, 小七的無線充電座 (Wireless Charging, 7-11)
* 拆, 電流急急樂
* 拆, 無線光學滑鼠
* 拆, 元宵節紙雕小燈籠燈芯 (7-color blinking LED)
* 拆, 堅若磐石手電筒
* 拆, 省電燈泡 (Compact Fluorescent Bulb)
* 拆, 玩具吸塵器 (toy, step motor, vibration motor)
* 拆, USB 車用充電器 (USB Car Charger)
* 拆, 震動發光充氣加油棒 (LED, vibration switch)

請問有辦法設定成,當寶物移動時,通知手機嗎?:)
回覆刪除以單純 beacon transmitter + receiver 的架構, 不行. 要用防丟器或定位之類的概念, 才能做到寶物移動後, 能通知手機.
回覆刪除好的謝謝您:D
回覆刪除你可以參考本文裡面的參考資料 * Tutorial: iBeacon App Development with CoreLocation on Apple iOS 7/8
回覆刪除o 不,我不是想了解IOS 的APP 如何设计!
回覆刪除我是想 知道 如何在CC2540 的code 上 实现 接收IOS 推送的信息?
目前TI 提供了CC2640的code ,但是我不知道如何移植 UUID coding这部分.
不知道你是否清楚,谢谢
Sorry, 我不清楚.
回覆刪除