กลับไปหน้ารวมไฟล์
wifi-based-smart-watch-with-google-api-b91f4c-en.md

Smart Wearables: The ESP-01 Internet Watch

Moving beyond basic Bluetooth, the WiFi-Based Smart Watch leverages the power of the ESP8266 ESP-01 to connect a wearable directly to the internet. This project transforms a wrist-worn device into a social media dashboard and a notification hub, capable of pulling live data from the YouTube API and displaying smartphone alerts via a custom-built Android app.

The ESP-01 Connectivity Logic

The ESP-01 is used as the "Brain" of the watch due to its ultra-compact form factor:

  • NTP Time Sync: Instead of a Real-Time Clock (RTC) chip, the watch uses Network Time Protocol (NTP). It connects to global time servers over WiFi to ensure the watch face is always accurate to the millisecond.
  • YouTube API Integration: By sending an HTTP GET request with a custom API key, the watch queries our YouTube channel statistics. It parses the JSON response to extract real-time Subscriber counts and View counts, updating the display every few minutes.
  • Social Tracking: Similar logic is applied to pull Instagram follower counts, making it a perfect tool for content creators to monitor their growth on the go.

Notification Server and MIT App Inventor

To bridge the gap between the watch and a smartphone, the project utilizes a Notification Server approach:

  1. Custom Android App: Using MIT App Inventor 2, a dedicated application was created to "Listen" to the phone's system notifications.
  2. TCP/UDP Relaying: When a new notification arrives (WhatsApp, SMS, Email), the app sends a packet over the local network (or via a cloud bridge) to the watch's IP address.
  3. OLED Display: The watch identifies the sender and the message snippet, rendering them on the 1.12'' Grove OLED Display using the U8g2 or Grove OLED library.

Compact Hardware Integration

Design for wearability is the biggest challenge of this build:

  • OLED 1.12'': Chosen for its I2C interface, requiring only two data wires (SDA/SCL) and providing deep blacks and high contrast for readability in various lighting.
  • Power Efficiency: The ESP-01 is known for high power draw during WiFi bursts. The project includes a 3.7V LiPo battery and a TP4056 charging module to ensure the watch can be easily recharged via USB.
  • Firmware Optimization: To maximize battery life, the software uses ESP.deepSleep() between data refreshes, waking up only to sync time or check for new notifications.

I made a smart watch last year based on Bluetooth but for few months I have been playing with ESP-01 WiFi module and was blown away by its abilities. So I decided to make an internet clock based on it. Well that was easy so I wanted to add more features to it and then one thing lead to another and finally I had a watch that uses google api to show our youtube channel statistics and instagram followers. Moreover, it has notification server that allows it to retrieve notifications from smartphone using an app we made on App Inventor

ข้อมูล Frontmatter ดั้งเดิม

title: "WiFi-Based Smart Watch (with Google API)"
description: "Made a WiFi-based watch with notification server and YouTube API."
author: "TeamASHcreations"
category: ""
tags:
  - "wearables"
  - "smartwatches"
  - "internet of things"
  - "monitoring"
  - "esp8266"
  - "youtube api"
views: 2998
likes: 2
price: 1499
difficulty: "Intermediate"
components:
  - "1x Grove - OLED Display 1.12'' V2"
  - "1x ESP8266 ESP-01"
  - "1x LiPo Battery 3.7V"
  - "1x TP4056 Charging Module"
tools: []
apps:
  - "1x MIT App Inventor 2"
  - "1x Arduino IDE"
downloadableFiles:
  - "https://projects.arduinocontent.cc/808e4d74-60a6-4f93-992c-4480aa4380ad.rar"
documentationLinks: []
passwordHash: "4b183951f0282958579202a81c41c1b97be97b46bddd0bd78cd40ea8912ceb43"
encryptedPayload: "U2FsdGVkX1+LoKZG0BUY5nG3GlqGHNKs9dUNImQ2XAO+EiNEBdJXh8n4tg3x4nr873HkEz7vfdSCx4ES6GUmvwEQrELDEP86cbee71/SMd9yWBjHPLkrNqJ2BK/zDEg+"
seoDescription: "Create a WiFi-based Smart Watch featuring Notification Server and YouTube API integration with ESP-01 and OLED."
videoLinks:
  - "https://www.youtube.com/embed/ZBr22-vJ2pc"
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/wifi-based-smart-watch-with-google-api-b91f4c_cover.jpg"
lang: "en"