2020-08-02 18:09:38 +02:00
2019-12-02 19:42:10 +01:00
# PineTime
2020-07-28 22:51:14 +02:00
2021-03-18 05:22:48 +01: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 22:51:14 +02:00
2019-12-05 19:39:52 +01:00
> The PineTime is a free and open source smartwatch capable of running custom-built open operating systems. Some of the notable features include a heart rate monitor, a week-long battery as well as a capacitive touch IPS display that is legible in direct sunlight. It is a fully community driven side-project, which means that it will ultimately be up to the developers and end-users to determine when they deem the PineTime ready to ship.
2019-12-05 19:44:19 +01:00
2019-12-05 19:39:52 +01:00
> We envision the PineTime as a companion for not only your PinePhone but also for your favorite devices — any phone, tablet, or even PC.
2019-11-17 20:47:04 +01:00
2020-07-18 22:15:14 +02:00
*https://www.pine64.org/pinetime/*
2020-07-23 00:33:57 +02:00
The **Pinetime** smartwatch is built around the NRF52832 MCU (512KB Flash, 64KB RAM), a 240*240 LCD display driven by the ST7789 controller, an accelerometer, a heart rate sensor, and a vibration motor.
2020-07-18 22:15:14 +02:00
2020-08-02 18:09:38 +02:00
# InfiniTime
![InfiniTime logo ](images/infinitime-logo.jpg "InfiniTime Logo" )
2020-07-18 22:15:14 +02:00
The goal of this project is to design an open-source firmware for the Pinetime smartwatch :
- 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 18:13:28 +01:00
- Using ** [LittleVGL/LVGL 7 ](https://lvgl.io/ )** as UI library...
2020-07-18 22:15:14 +02:00
- ... and ** [NimBLE 1.3.0 ](https://github.com/apache/mynewt-nimble )** as BLE stack.
2020-07-23 00:33:57 +02:00
## Overview
2020-07-18 22:15:14 +02:00
2021-02-25 21:18:22 +01:00
![Pinetime screens ](images/0.14.0/collage1.png "PinetimeScreens" )
![Pinetime screens ](images/0.14.0/collage2.png "PinetimeScreens" )
2020-07-18 22:15:14 +02:00
As of now, here is the list of achievements of this project:
- Fast and optimized LCD driver
- BLE communication
2020-08-30 03:41:23 +02:00
- Rich user interface via display, touchscreen and pushbutton
2020-07-23 00:33:57 +02:00
- Time synchronization via BLE
2020-07-18 22:15:14 +02:00
- Notification via BLE
- Multiple 'apps' :
2021-01-23 21:05:37 +01:00
* Clock (displays the date, time, battery level, ble connection status, heart rate)
* System info (displays various info : BLE MAC, build date/time, uptime, version,...)
* Brightess (allows the user to configure the brightness of the display)
* Music (control the playback of the music on your phone)
* Heart rate (controls the heart rate sensor and display current heartbeat)
* Navigation (displays navigation instructions coming from the companion app)
* Notification (displays the last notification received)
* Paddle (single player pong-like game)
* Two (2048 clone game)
2020-08-30 03:41:23 +02:00
- Supported by 2 companion apps (development is in progress):
2020-09-20 14:40:31 +02:00
* [Gadgetbridge ](https://codeberg.org/Freeyourgadget/Gadgetbridge/ ) (on Android)
2021-01-23 21:05:37 +01:00
* [Amazfish ](https://openrepos.net/content/piggz/amazfish ) (on SailfishOS and Linux)
2021-03-04 17:11:06 +01:00
* **[Experimental]** [WebBLEWatch ](https://hubmartin.github.io/WebBLEWatch/ ) Synchronize time directly from your web browser. [video ](https://youtu.be/IakiuhVDdrY )
2020-07-18 22:15:14 +02:00
- **[Experimental]** OTA (Over-the-air) update via BLE
- **[Experimental]** Bootloader based on [MCUBoot ](https://juullabs-oss.github.io/mcuboot/ )
2020-04-05 17:03:06 +02:00
## Documentation
2020-07-27 21:23:51 +02:00
2020-11-20 18:36:39 +01:00
### Getting started
- [Flash, upgrade (OTA), time synchronization,... ](doc/gettingStarted/gettingStarted.md )
2020-08-08 20:28:55 +02:00
### Develop
2020-10-02 21:16:48 +02:00
- [Generate the fonts and symbols ](src/displayapp/fonts/Readme.md )
2020-08-08 20:28:55 +02:00
2020-07-18 22:15:14 +02:00
### Build, flash and debug
2020-07-26 16:15:12 +02:00
- [Project branches ](doc/branches.md )
- [Versioning ](doc/versioning.md )
2020-07-27 21:23:51 +02:00
- [Files included in the release notes ](doc/filesInReleaseNotes.md )
2020-07-18 22:15:14 +02:00
- [Build the project ](doc/buildAndProgram.md )
2020-09-28 22:07:54 +02:00
- [Flash the firmware using OpenOCD and STLinkV2 ](doc/openOCD.md )
2020-08-19 22:04:48 +02:00
- [Build the project with Docker ](doc/buildWithDocker.md )
2020-07-18 22:15:14 +02: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 16:15:12 +02:00
2020-08-08 20:33:00 +02:00
### Contribute
2020-07-26 16:15:12 +02:00
- [How to contribute ? ](doc/contribute.md )
2020-07-18 22:15:14 +02:00
### API
- [BLE implementation and API ](./doc/ble.md )
2020-01-17 15:02:43 +01:00
2020-07-18 22:15:14 +02:00
### Architecture and technical topics
2020-07-20 21:30:00 +02:00
- [Memory analysis ](./doc/MemoryAnalysis.md )
2019-12-26 12:02:01 +01:00
2020-07-18 22:15:14 +02:00
### Using the firmware
2020-11-09 11:01:03 +01:00
- [Integration with Gadgetbridge ](doc/companionapps/Gadgetbridge.md )
- [Integration with AmazFish ](doc/companionapps/Amazfish.md )
- [Firmware update, OTA ](doc/companionapps/NrfconnectOTA.md )
2020-03-29 15:19:39 +02:00
2020-07-18 22:15:14 +02:00
## TODO - contribute
2020-07-23 00:33:57 +02: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 22:15:14 +02: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-23 00:33:57 +02:00
- Add more functionalities : Alarm, chronometer, configuration, activities, heart rate logging, games,...
2020-07-18 22:15:14 +02: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
2020-07-25 22:48:53 +02: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-23 00:33:57 +02:00
- Design a simple CI (preferably self-hosted and easy to reproduce).
2020-07-18 22:15:14 +02: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 17:38:51 +02:00
## Licenses
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
2020-07-18 22:15:14 +02:00
## Credits
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 15:19:39 +02:00
2020-07-18 22:15:14 +02:00
Here are some people I would like to highlight:
2020-03-29 15:19:39 +02:00
2020-07-18 22:15:14 +02: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 18:16:38 +02: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-23 00:33:57 +02: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 15:19:39 +02:00
2020-07-18 22:15:14 +02:00
*If you feel like you should appear on this list, just get in touch with me or submit a PR :)*