Recently, I found about ANCS that enables BLE devices to receive iPhone's notifications.
And, I have BLE including development board M5StickC. That has a display and battery, etc. I only need to write code.
I decideed to make prototype. Just receive notifications and show them.
It will be something interesting, maybe...
Set RTCUPDATE(2019-10-03): Not required to set RTC.
https://github.com/takeru/Arduino_ESP32_ANCS/commit/2ceb8445611ee356b184592afb69fe4d01e1c08a
(!!!Not required to do this!!!)
First, you need to set RTC.
Use your own tool or mine: https://gist.github.com/takeru/c2922ec229dcc9ad9fc3c601930160aa
You need to configure WiFi SSID & password. And ntp address, timezone, etc.
Codehttps://github.com/takeru/Arduino_ESP32_ANCS/blob/M5StickC_Watch_Contest/Arduino_ESP32_ANCS.ino
Clone and open with Arduino IDE. And, write sketch to M5StickC.
Open iPhone's Bluetooth setting. Find device named "Watch".
Select it and do pairing. After that, you will be asked to allow "Watch" to use notification data.
If you have notifications. RED LED is notice every 10sec.
If you had called-in, LED will flick and show "Calling.." in display.
And if you misplaced your iPhone (BLE Connection is lost), Watch will alert you on LED and Display.
Ah, this is watch. You can see what time is it. Sometimes shows current time.
CustomizeWe can receive more contents from iPhone. Sender name, summary of message, etc... Filter notifications only you want to know.
Play sound from SPEAKER HAT. "Watch, Can you read a message ?"
Many interesting gadgets will be born from M5StickC🍊 & iPhone🍎
LinksI referenced many code from:
https://github.com/nkolban/esp32-snippets/issues/430
https://github.com/S-March/esp32_ANCS
Comments