A comprehensive fitness tracking app for Pebble smartwatches that supports both running and swimming activities with GPS tracking and real-time statistics.
- GPS Tracking: Real-time location tracking with high accuracy
- Live Statistics:
- Elapsed time
- Distance (km/miles)
- Current pace
- Lap times and splits
- Auto Features:
- Auto-start when movement detected
- Auto-stop after 15 seconds of inactivity
- Auto-lap at configurable distances
- Distance Alerts: Vibration notifications at every kilometer/mile
- Heart Rate Monitoring: Display current heart rate (on compatible devices)
- Pool Swimming: Optimized for pool-based swimming
- Lap Tracking: Manual lap button or automatic lap counting
- Configurable Pool Length: Support for 25m, 50m, 25yd pools
- Statistics:
- Total time
- Distance (meters/yards)
- Lap count
- Pace per 100m/100yd
Navigate through different data screens during your workout:
- Main View: Time, distance, and pace
- Lap View: Current lap statistics
- Heart Rate View: Real-time heart rate data
- Splits View: Historical lap information
- Units: Switch between metric (km) and imperial (miles)
- Auto-lap: Enable/disable and configure distance
- Distance Alerts: Toggle vibration alerts
- Sport Mode: Easy switching between Run and Swim modes
- Pool Length: Customize pool length for swimming
| Ready Screen | Running Mode | Sport Selection |
The app uses a two-part architecture:
- Watch-side (C): Handles UI, state management, distance calculations, and lap tracking
- Phone-side (JavaScript): Manages GPS tracking and forwards location data to the watch via Bluetooth
The fastest way to get started is using GitHub Codespaces with our pre-configured development environment:
- Click the "Open in GitHub Codespaces" badge at the top of this README
- Wait for the container to build (2-3 minutes on first launch)
- The Pebble SDK, emulator, and all dependencies will be automatically installed
- Start building:
pebble build - Test on emulator:
pebble install --emulator basalt
The devcontainer includes:
- β Pebble SDK (latest version)
- β Pebble emulator with SDL support
- β Python and Node.js
- β VS Code extensions for Pebble development
- β All required build tools
- Pebble SDK 3.0+
- Python 2.7 (for Pebble SDK)
- Node.js (for JavaScript components)
-
Clone the repository
git clone https://github.com/bruhdev1290/sportsomatic.git cd sportsomatic/sportsomatic -
Install dependencies
pebble build
-
Install to your watch
pebble install --phone <PHONE_IP>
Or use CloudPebble to build and install.
Download the latest .pbw file from the Releases page and install it using the Pebble mobile app.
- Launch the app on your Pebble watch
- Select your sport (Run or Swim) using the menu
- Press SELECT to start tracking
- During workout:
- Press UP to manually mark a lap (running mode)
- Press DOWN to cycle through data views
- Press SELECT to pause/resume
- Hold BACK to end the workout
| Button | Action | Long Press |
|---|---|---|
| SELECT | Start/Pause/Resume | Change sport mode |
| UP | Mark lap (Run mode) | - |
| DOWN | Switch view | - |
| BACK | Show tip | End workout |
The app automatically starts tracking when it detects movement (configurable). GPS data is continuously sent to the watch, tracking:
- Distance traveled using Haversine formula
- Current speed and pace
- Automatic lap marking at each km/mile
Optimized for pool swimming where GPS is not reliable:
- Each lap button press increments distance by pool length
- Automatic lap tracking based on configured pool length
- Shows total laps, distance, and pace per 100m/yd
sportsomatic/
βββ src/
β βββ c/
β β βββ myfirstproject.c # Watch-side C code
β βββ pkjs/
β βββ index.js # Phone-side JavaScript
βββ package.json # App metadata
βββ wscript # Build configuration
- Pebble Aplite (black & white)
- Pebble Basalt (color)
- Pebble Chalk (round, color)
- Pebble Diorite (black & white)
- Pebble Emery (larger, color)
The app uses Pebble's AppMessage API to communicate between the watch and phone:
- Watch β Phone: Commands (START, PAUSE, RESUME, STOP), settings
- Phone β Watch: GPS coordinates, speed, accuracy, status messages
- High accuracy mode enabled
- Position updates throttled to 1 second intervals
- Filters positions with accuracy > 50m
- Uses Haversine formula for distance calculation
- C Code (
src/c/): Watch-side application logic, UI rendering, and state management - JavaScript (
src/pkjs/): Phone-side GPS tracking and message routing - Build System: WAF-based build system via
wscript
- GPS Tracking: Haversine distance calculation between coordinate pairs
- Auto-start/stop: Movement detection based on speed and position delta
- Multi-page UI: State machine for different data views
- Sport Modes: Configurable behavior for running vs swimming
- Heart Rate: Integration with Pebble Health API (on compatible devices)
pebble buildTest on emulator:
pebble install --emulator <platform>Platforms: aplite, basalt, chalk, diorite, emery
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is open source. Please check the repository for license information.
Author: MakeAwesomeHappen (bruhdev1290)
For issues, questions, or suggestions, please open an issue on the GitHub repository.
Note: This app requires the Pebble mobile app and a compatible Pebble smartwatch. Since Pebble's official services were discontinued, you'll need to use Rebble services to use the app.