Maker.io main logo

Notifications From iPhone to ESP32-Watch

2024-07-08 | By M5Stack

License: General Public License Bluetooth / BLE Displays Wifi Arduino M5Stack M5Stick ESP32

Thanks for the source code and project info provided by @SASAKI TAKERU

 

1

 

2

 

Things used in this project

Hardware components

M5Stick C/M5Stick C plus2 with watch accessories x1

Software apps and online services

Arduino IDE

Story

Recently, I found about ANCS that enables BLE devices to receive iPhone's notifications.

I have BLE including development board M5StickC. That has a display and battery, etc. I only need to write the code.

I decided to make a prototype. Just receive notifications and show them.

It will be something interesting, maybe...

Set RTC

Not required to set RTC.

https://github.com/takeru/Arduino_ESP32_ANCS/commit/2ceb8445611ee356b184592afb69fe4d01e1c08a

Copy Code
(!!!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.

Code

https://github.com/takeru/Arduino_ESP32_ANCS/blob/M5StickC_Watch_Contest/Arduino_ESP32_ANCS.ino

Clone and open with Arduino IDE and write the 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.

If you misplaced your iPhone (BLE Connection is lost), the watch will alert you on LED and Display.

Ah, this is a watch. You can see what time it is and sometimes it shows the current time.

Customize

We 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🍎

Links

I referenced many codes from:

https://github.com/nkolban/esp32-snippets/issues/430

https://github.com/S-March/smarchWatch_PUBLIC/tree/master/Software/smarchWatch_DA14683/DA1468x_SDK_1.0.14.1081/DA1468x_DA15xxx_SDK_1.0.14.1081/projects/dk_apps/ble_profiles/smarchWatch

https://github.com/S-March/esp32_ANCS

Complete project code

https://github.com/takeru/Arduino_ESP32_ANCS

 

 

制造商零件编号 K016-H
M5STICKC PLUS W/ WATCH ACCESSORY
M5Stack Technology Co., Ltd.
¥198.46
Details
制造商零件编号 K016-H2
M5STICKC PLUS2 WITH WATCH ACCESS
M5Stack Technology Co., Ltd.
¥198.46
Details
Add all DigiKey Parts to Cart
TechForum

Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.

Visit TechForum