Added a small guide to be able to install the tools needed for the lvgl builtin font regeneration script
This commit is contained in:
parent
59a1eec7b7
commit
c636eb8ba2
77
README.md
77
README.md
@ -6,6 +6,8 @@ I am also quite unhappy with the smartwatches that are on the market (expensive,
|
||||
I also wanted to test this W800 SOC more deeply and see what it could do and I think it is a perfect fit for the project.
|
||||
So let's go !
|
||||
|
||||
# Update : the release firmware is stable and usable for everyday use.
|
||||
|
||||
## A Smart Watch project using the Chinese W800 SOC.
|
||||
The W800 is a pretty interesting chip with impressive characteristics for its price (around 1$) :
|
||||
### Core :
|
||||
@ -62,7 +64,7 @@ The W800 is a pretty interesting chip with impressive characteristics for its pr
|
||||
## Getting started :
|
||||
### So, you'd like to try this project yourself ?
|
||||
### Here are the steps to follow, in order to build the firmware and flash the board :
|
||||
#### On Windows :
|
||||
#### **On Windows :**
|
||||
1) Start by cloning this repository.
|
||||
**Put it in a path that doesn't contain any spaces** ie : "C:\Users\Bob\Desktop\projects" for example.
|
||||
2) Once cloning is done, you will need to install the [MSYS2](https://www.msys2.org/) tool/environment. This tool is needed to compile the project using **Make**.
|
||||
@ -121,6 +123,56 @@ make down
|
||||
#This will do both previous commands in one (build and flash)
|
||||
make flash
|
||||
```
|
||||
|
||||
## Regenerating LVGL builtin fonts (to add special characters for example) :
|
||||
### If you need to modify the font by changing the default one or need to add missing characters or symbols, you w'll have to install a few tools :
|
||||
#### **On Windows** (every thing is done in Windows 10's Linux console) :
|
||||
1) Check that python3 is installed and available :
|
||||
```bash
|
||||
python3 -V
|
||||
#If python3 is not installed, do it with :
|
||||
sudo apt install python3
|
||||
```
|
||||
2) You will need to install or update nodejs (version v14+ required) as it is used to generate the fonts :
|
||||
```bash
|
||||
node -v
|
||||
#If nodejs is not installed, do it with using the Node Version Manager :
|
||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
|
||||
```
|
||||
3) Update your .bashrc by adding these lines at the end of it :
|
||||
```bash
|
||||
export NVM_DIR="$HOME/.nvm"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
||||
```
|
||||
4) Don't forget to reload you .bashrc file using :
|
||||
```bash
|
||||
source ~/.bashrc
|
||||
```
|
||||
5) Then having node installed, install the **[lv_font_conv](https://github.com/lvgl/lv_font_conv)** utility :
|
||||
```bash
|
||||
sudo npm install lv_font_conv -g
|
||||
#If the lv_font_conv module is successfully installed, you should be able to check its verrsion :
|
||||
lv_font_conv -v
|
||||
#My output is : 1.5.2
|
||||
```
|
||||
6) Finally, using the command line terminal, you need to move to the ***src/W800_SDK_v1.00.10/lvlg/lvgl_v8.3/scripts/built_in_font*** folder and execute using
|
||||
python3 the **built_in_font_gen.py** script :
|
||||
```bash
|
||||
#Here are some font regeneration examples using the tool :
|
||||
python3 built_in_font_gen.py -s 14 --bpp 4 --font Montserrat-Medium.ttf -r 0x20-0x7F,0xB0,0x2022,0xC0,0xC4,0xC7,0xC8,0xC9,0xCA,0xCB,0xCE,0xD4,0xD6,0xD9,0xDC,0xDF,0xE0,0xE2,0xE4,0xE7-0xEB,0xEE,0xEF,0xF6,0xFC,0x153 -o lv_font_montserrat_14.c
|
||||
|
||||
python3 built_in_font_gen.py -s 16 --bpp 4 --font Montserrat-Medium.ttf -r 0x20-0x7F,0xB0,0x2022,0xC0,0xC4,0xC7,0xC8,0xC9,0xCA,0xCB,0xCE,0xD4,0xD6,0xD9,0xDC,0xDF,0xE0,0xE2,0xE4,0xE7-0xEB,0xEE,0xEF,0xF6,0xFC,0x153 -o lv_font_montserrat_16.c
|
||||
|
||||
python3 built_in_font_gen.py -s 24 --bpp 4 --font Montserrat-Medium.ttf -r 0x20-0x7F,0xB0,0x2022,0xC0,0xC4,0xC7,0xC8,0xC9,0xCA,0xCB,0xCE,0xD4,0xD6,0xD9,0xDC,0xDF,0xE0,0xE2,0xE4,0xE7-0xEB,0xEE,0xEF,0xF6,0xFC,0x153 -o lv_font_montserrat_24.c
|
||||
|
||||
python3 built_in_font_gen.py -s 28 --bpp 4 --font Montserrat-Medium.ttf -r 0x20-0x7F,0xB0,0x2022,0xC0,0xC4,0xC7,0xC8,0xC9,0xCA,0xCB,0xCE,0xD4,0xD6,0xD9,0xDC,0xDF,0xE0,0xE2,0xE4,0xE7-0xEB,0xEE,0xEF,0xF6,0xFC,0x153 -o lv_font_montserrat_28.c
|
||||
|
||||
python3 built_in_font_gen.py -s 30 --bpp 4 --font Montserrat-Medium.ttf -r 0x20-0x7F,0xB0,0x2022,0xC0,0xC4,0xC7,0xC8,0xC9,0xCA,0xCB,0xCE,0xD4,0xD6,0xD9,0xDC,0xDF,0xE0,0xE2,0xE4,0xE7-0xEB,0xEE,0xEF,0xF6,0xFC,0x153 -o lv_font_montserrat_30.c
|
||||
```
|
||||
7) Once done, the new generated fonts file will be in the same folder (***src/W800_SDK_v1.00.10/lvlg/lvgl_v8.3/scripts/built_in_font***) named **lv_font_'font name'_'size'.c**
|
||||
like lv_font_monserrat_14.c, happy fonting !!!
|
||||
|
||||
## Sensors and I2C addresses :
|
||||
* Accelerometer : **BMA456** I2C addr : 0x18 or 0x19 7 bit address.
|
||||
* Magnetometer : **QMC5883L** I2C addr : 0x0D 7 bit address.
|
||||
@ -201,9 +253,16 @@ using a magnetic 4 pin plug.
|
||||
* Supported LCD touch screen :
|
||||
* CST816D I2C capacitive touch ic.
|
||||
* Six screens designed and working with LVGL :
|
||||
* A watch face based on a casio watch.
|
||||
* An analog watch face based on a existing casio watch.
|
||||
* An analog watch face having a carbon fiber vibe.
|
||||
* A circular menu screen with icons.
|
||||
* A setting screen with basic settings (date and time + display brightness) (work in progress).
|
||||
* A setting screen allowing to tune the smart watch :
|
||||
* Time and date settings
|
||||
* Display settings
|
||||
* Notifications settings
|
||||
* Connectivity settings for BLE
|
||||
* Language settings (French, Germman and English available)
|
||||
* Systemm information page
|
||||
* A compass application using the QMC5883L.
|
||||
* An altimeter app.
|
||||
* A music player app (working with GadgetBridge).
|
||||
@ -235,15 +294,15 @@ sets a white background, be able to make it also flash with a red background.
|
||||
* Update the GadgetBridge parser to work with the latest version of GadgetBridge.
|
||||
* Write an algorithm to get the heart rate measurements and a way to make them periodically and displays it in a dedicated app and on the watch face.
|
||||
* Display the weather forecast on the watch face using icons (Data coming from GadgetBridge).
|
||||
* Finish to translate all texts in the 3 supported languages (French, English and German).
|
||||
* Design a digital watch face with a light memory footprint to be able to choose a watch face kind at run time.
|
||||
* Finish to translate all texts in the 3 supported languages (French, German and English).
|
||||
* Design a digital watch face with a light memory footprint to be able to choose a watch face kind (analog or digital) at run time.
|
||||
* Improve the step counting mechanism (reset step count every midnight).
|
||||
* Write an app to track step counts made every day.
|
||||
* Write an app to track step counts made every day (on a week for example with a graph).
|
||||
* Write an alarm app which set an RTC alarm to vibrate the watch.
|
||||
* Write a timer app with countdown and lap functionality.
|
||||
* Implement a battery save mode activated on low batterie (ie <= 10 %).
|
||||
* Implement a battery saving mode activated on low batterie (ie <= 10 %).
|
||||
* This mode would turn bluetooth off
|
||||
* This mode would decrease the screen brightness to 50 %
|
||||
* This mode would set the screen brightness to 50 %
|
||||
|
||||
|
||||
## Done List :
|
||||
@ -254,7 +313,7 @@ sets a white background, be able to make it also flash with a red background.
|
||||
* A compass app with temperature reading.
|
||||
* An altimeter app.
|
||||
* The find my phone app (works with GadgetBridge).
|
||||
* A settings app to set :
|
||||
* A setting app to set :
|
||||
* Time and date
|
||||
* Display settings
|
||||
* Notification settings
|
||||
|
Loading…
Reference in New Issue
Block a user