vsbogd / open-smartwatch-os

The Open-Smartwatch Operating System.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HowTo Run

Please read the documentation on the website!

Prerequirements

  • install PlatformIO Core or PlatformIO IDE (which installs PlatformIO core automatically)
  • For improved LUA Script support, see env:pico32_LIGHT_EDITION_PREBUILD_LUA: install SWIG (also available in most package managers, e.g. brew install swig)
  • Then clone this repository
$ git clone --recurse-submodules https://github.com/Open-Smartwatch/open-smartwatch-os.git

build

The master branch is a stable version and the develop branch is a beta version. Recommended that you upload the master branch.

Visual Studio Code

Open the cloned repo in VSCode:

$ code open-smartwatch-os

And rename file include/config.h.example to include/config.h and adapt the values according to your requirements and press F5 to build it.

CLI

You can instead go to the repo folder with your terminal and run

$ pio run -e pico32_LIGHT_EDITION -t upload

respectively

$ pio run -e pico32_GPS_EDITION -t upload

Depending on the watch model.

Debugging(CLI)

If you want to print out the log for debugging, following command:

$ pio device monitor

Creating Screen Shots of your Apps

  • Wi-Fi needs to be able to connect for this to work.
  • you will need bash and ImageMagick for the helper scripts to work

The raw screenserver runs in the background and prints via serial:

Started Raw ScreenServer
http://<IP_OF_WATCH>/api/screenserver

HowTo

  • add -D RAW_SCREEN_SERVER to your build flags in platformio.ini
  • build + flash + reset watch
  • wait for the server to be started (see msg above)
  • run bash fetchScreen.sh <IP_OF_WATCH> screenshot.png
  • run bash composeScreen.sh screenshot.png screenshot_composed.png

The fetchScreen.sh downloads the raw image buffer from the running screen server, and converts the image to png. The composeScreen.sh creates the image with a surrounding smartwatch (light edition).

The fast way (recommended)

Run the following inside the open-smartwatch-os directory:

$ cd scripts/screen_capture/
$ ./createScreenshot.sh <IP_OF_WATCH> <SCREENSHOT>
  • The captured file can be found in the screenshot/ folder inside the open-smartwatch-os directory.

Troubleshooting

For more information on troubleshooting, see Wiki.

Arduino_TFT.h: No such file or directory

You did not clone the repository with the --recursive-submodules flag.

'LANG_STW_START' was not declared in this scope

You did not rename include/config.h.example

Failed to connect to ESP32: Timed out waiting for packet header

You did not hold down BTN1(FLASH) and then tap the RESET button on the watch whilst platform.io was trying to connect.

About

The Open-Smartwatch Operating System.

License:GNU General Public License v3.0


Languages

Language:C 84.4%Language:C++ 14.4%Language:HTML 0.6%Language:Python 0.2%Language:Shell 0.1%Language:Lua 0.1%Language:SWIG 0.1%