2021-09-16 20:01:25 +00:00
# InfiniTime
2020-07-28 20:51:14 +00:00
2021-03-18 04:22:48 +00:00
[![Build PineTime Firmware ](https://github.com/JF002/InfiniTime/workflows/Build%20PineTime%20Firmware/badge.svg?branch=master )](https://github.com/JF002/InfiniTime/actions)
2020-07-28 20:51:14 +00:00
2020-08-02 16:09:38 +00:00
![InfiniTime logo ](images/infinitime-logo.jpg "InfiniTime Logo" )
2021-09-16 20:01:25 +00:00
The goal of this project is to design an open-source firmware for the [Pinetime smartwatch ](https://www.pine64.org/pinetime/ ) :
2020-07-18 20:15:14 +00:00
- Code written in **modern C++** ;
- Build system based on **CMake** ;
- Based on ** [FreeRTOS 10.0.0 ](https://freertos.org )** real-time OS.
2021-01-28 17:13:28 +00:00
- Using ** [LittleVGL/LVGL 7 ](https://lvgl.io/ )** as UI library...
2020-07-18 20:15:14 +00:00
- ... and ** [NimBLE 1.3.0 ](https://github.com/apache/mynewt-nimble )** as BLE stack.
2021-09-16 20:01:25 +00:00
## New to InfiniTime?
- [Getting started with InfiniTime 1.0 (quick user guide, update bootloader and InfiniTime,...) ](doc/gettingStarted/gettingStarted-1.0.md )
- [Flash, upgrade (OTA), time synchronization,... ](doc/gettingStarted/ota-gadgetbridge-nrfconnect.md )
2020-07-22 22:33:57 +00:00
## Overview
2020-07-18 20:15:14 +00:00
2021-04-21 19:56:43 +00:00
![Pinetime screens ](images/1.0.0/collage.png "PinetimeScreens" )
2020-07-18 20:15:14 +00:00
As of now, here is the list of achievements of this project:
- Fast and optimized LCD driver
- BLE communication
2020-08-30 01:41:23 +00:00
- Rich user interface via display, touchscreen and pushbutton
2020-07-22 22:33:57 +00:00
- Time synchronization via BLE
2020-07-18 20:15:14 +00:00
- Notification via BLE
2021-03-31 19:33:21 +00:00
- Heart rate measurements
- Step counting
- Wake-up on wrist rotation
2021-07-25 15:50:55 +00:00
- Quick actions
2021-04-21 19:56:43 +00:00
* Disable vibration on notification
* Brightness settings
* Flashlight
* Settings
2021-07-24 18:23:44 +00:00
- 3 watch faces:
2021-04-21 19:56:43 +00:00
* Digital
* Analog
2021-07-24 18:23:44 +00:00
* [PineTimeStyle ](https://wiki.pine64.org/wiki/PineTimeStyle )
2021-04-21 19:56:43 +00:00
- Multiple 'apps' :
2021-07-25 15:50:55 +00:00
* Music (control the playback of music on your phone)
* Heart rate (measure your heart rate)
2021-01-23 20:05:37 +00:00
* Navigation (displays navigation instructions coming from the companion app)
* Notification (displays the last notification received)
* Paddle (single player pong-like game)
2021-07-25 15:50:55 +00:00
* Twos (2048 clone game)
* Stopwatch
* Steps (displays the number of steps taken)
* Timer (set a countdown timer that will notify you when it expires)
2021-07-11 17:46:15 +00:00
* Metronome (vibrates to a given bpm with a customizable beats per bar)
2021-04-21 19:56:43 +00:00
- User settings:
* Display timeout
* Wake-up condition
* Time format (12/24h)
* Default watch face
2021-07-25 15:50:55 +00:00
* Daily step goal
2021-04-21 19:56:43 +00:00
* Battery status
* Firmware validation
* System information
2021-03-23 23:19:56 +00:00
- Supported by 3 companion apps (development is in progress):
2021-06-12 09:05:57 +00:00
* [Gadgetbridge ](https://codeberg.org/Freeyourgadget/Gadgetbridge/ ) (on Android via F-Droid)
2021-01-23 20:05:37 +00:00
* [Amazfish ](https://openrepos.net/content/piggz/amazfish ) (on SailfishOS and Linux)
2021-03-23 23:19:56 +00:00
* [Siglo ](https://github.com/alexr4535/siglo ) (on Linux)
2021-03-04 16:11:06 +00:00
* **[Experimental]** [WebBLEWatch ](https://hubmartin.github.io/WebBLEWatch/ ) Synchronize time directly from your web browser. [video ](https://youtu.be/IakiuhVDdrY )
2021-09-16 20:01:25 +00:00
* **[Experimental]** [Infini-iOS ](https://github.com/xan-m/Infini-iOS ) (on iOS)
2021-04-21 19:56:43 +00:00
- OTA (Over-the-air) update via BLE
- [Bootloader ](https://github.com/JF002/pinetime-mcuboot-bootloader ) based on [MCUBoot ](https://juullabs-oss.github.io/mcuboot/ )
2021-07-25 15:50:55 +00:00
2020-04-05 15:03:06 +00:00
## Documentation
2020-07-27 19:23:51 +00:00
2020-08-08 18:28:55 +00:00
### Develop
2021-07-25 15:50:55 +00:00
2021-04-18 17:28:14 +00:00
- [Generate the fonts and symbols ](src/displayapp/fonts/README.md )
2021-04-13 17:15:29 +00:00
- [Creating a stopwatch in Pinetime(article) ](https://pankajraghav.com/2021/04/03/PINETIME-STOPCLOCK.html )
2020-08-08 18:28:55 +00:00
2020-07-18 20:15:14 +00:00
### Build, flash and debug
2021-07-25 15:50:55 +00:00
2020-07-26 14:15:12 +00:00
- [Project branches ](doc/branches.md )
- [Versioning ](doc/versioning.md )
2020-07-27 19:23:51 +00:00
- [Files included in the release notes ](doc/filesInReleaseNotes.md )
2020-07-18 20:15:14 +00:00
- [Build the project ](doc/buildAndProgram.md )
2020-09-28 20:07:54 +00:00
- [Flash the firmware using OpenOCD and STLinkV2 ](doc/openOCD.md )
2020-08-19 20:04:48 +00:00
- [Build the project with Docker ](doc/buildWithDocker.md )
2021-07-26 01:14:23 +00:00
- [Build the project with VSCode ](doc/buildWithVScode.md )
2020-07-18 20:15:14 +00:00
- [Bootloader, OTA and DFU ](./bootloader/README.md )
- [Stub using NRF52-DK ](./doc/PinetimeStubWithNrf52DK.md )
- Logging with JLink RTT.
- Using files from the releases
2020-07-26 14:15:12 +00:00
2020-08-08 18:33:00 +00:00
### Contribute
2021-07-25 15:50:55 +00:00
2020-07-26 14:15:12 +00:00
- [How to contribute ? ](doc/contribute.md )
2020-07-18 20:15:14 +00:00
### API
2021-07-25 15:50:55 +00:00
2020-07-18 20:15:14 +00:00
- [BLE implementation and API ](./doc/ble.md )
2021-07-25 15:50:55 +00:00
2020-07-18 20:15:14 +00:00
### Architecture and technical topics
2021-07-25 15:50:55 +00:00
2020-07-20 19:30:00 +00:00
- [Memory analysis ](./doc/MemoryAnalysis.md )
2021-07-25 15:50:55 +00:00
2020-07-18 20:15:14 +00:00
### Using the firmware
2021-07-25 15:50:55 +00:00
2020-11-09 10:01:03 +00:00
- [Integration with Gadgetbridge ](doc/companionapps/Gadgetbridge.md )
- [Integration with AmazFish ](doc/companionapps/Amazfish.md )
- [Firmware update, OTA ](doc/companionapps/NrfconnectOTA.md )
2021-07-25 15:50:55 +00:00
2020-07-18 20:15:14 +00:00
## TODO - contribute
2020-07-22 22:33:57 +00:00
This project is far from being finished, and there are still a lot of things to do for this project to become a firmware usable by the general public.
2020-07-18 20:15:14 +00:00
Here a quick list out of my head of things to do for this project:
- Improve BLE communication stability and reliability
- Improve OTA and MCUBoot bootloader
2020-07-22 22:33:57 +00:00
- Add more functionalities : Alarm, chronometer, configuration, activities, heart rate logging, games,...
2020-07-18 20:15:14 +00:00
- Add more BLE functionalities : call notifications, agenda, configuration, data logging,...
- Measure power consumption and improve battery life
- Improve documentation, take better pictures and video than mine
- Improve the UI
2021-07-25 15:50:55 +00:00
- Create companion app for multiple OSes (Linux, Android, iOS) and platforms (desktop, ARM, mobile). Do not forget the other devices from Pine64 like [the Pinephone ](https://www.pine64.org/pinephone/ ) and the [Pinebook Pro ](https://www.pine64.org/pinebook-pro/ ).
2020-07-22 22:33:57 +00:00
- Design a simple CI (preferably self-hosted and easy to reproduce).
2021-07-25 15:50:55 +00:00
2020-07-18 20:15:14 +00:00
Do not hesitate to clone/fork the code, hack it and create pull-requests. I'll do my best to review and merge them :)
2020-08-02 15:38:51 +00:00
## Licenses
2021-07-25 15:50:55 +00:00
2020-08-02 15:38:51 +00:00
This project is released under the GNU General Public License version 3 or, at your option, any later version.
It integrates the following projects:
- RTOS : ** [FreeRTOS ](https://freertos.org )** under the MIT license
- UI : ** [LittleVGL/LVGL ](https://lvgl.io/ )** under the MIT license
- BLE stack : ** [NimBLE ](https://github.com/apache/mynewt-nimble )** under the Apache 2.0 license
- Font : ** [Jetbrains Mono ](https://www.jetbrains.com/fr-fr/lp/mono/ )** under the Apache 2.0 license
2021-07-25 15:50:55 +00:00
## Credits
2020-07-18 20:15:14 +00:00
I’ m not working alone on this project. First, many people create PR for this projects. Then, there is the whole #pinetime community : a lot of people all around the world who are hacking, searching, experimenting and programming the Pinetime. We exchange our ideas, experiments and code in the chat rooms and forums.
2020-03-29 13:19:39 +00:00
2020-07-18 20:15:14 +00:00
Here are some people I would like to highlight:
2020-03-29 13:19:39 +00:00
2020-07-18 20:15:14 +00:00
- [Atc1441 ](https://github.com/atc1441/ ) : He works on an Arduino based firmware for the Pinetime and many other smartwatches based on similar hardware. He was of great help when I was implementing support for the BMA421 motion sensor and I²C driver.
2020-07-25 16:16:38 +00:00
- [Koen ](https://github.com/bosmoment ) : He’ s working on a firmware based on RiotOS. He integrated similar libs as me : NimBLE, LittleVGL,… His help was invaluable too!
2020-07-22 22:33:57 +00:00
- [Lup Yuen Lee ](https://github.com/lupyuen ) : He is everywhere: he works on a Rust firmware, builds a MCUBoot based bootloader for the Pinetime, designs a Flutter based companion app for smartphones and writes a lot of articles about the Pinetime!
2020-03-29 13:19:39 +00:00
2020-07-18 20:15:14 +00:00
*If you feel like you should appear on this list, just get in touch with me or submit a PR :)*