Skip to content
No description, website, or topics provided.
Go
Branch: master
Clone or download
aykevl Update README.md
Note that PineTime support has not yet landed in a release yet.
Latest commit e6e9277 Nov 6, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples
img Add README Nov 2, 2019
LICENSE
README.md
smartwatch.go Add battery charge indication Oct 30, 2019
smartwatch_desktop.go Add battery charge indication Oct 30, 2019
smartwatch_pinetime-devkit0.go Add battery charge indication Oct 30, 2019
smartwatch_test.go
smartwatch_x9pro.go Add support for the X9 Pro smartwatch Nov 2, 2019

README.md

Go smartwatch toolkit

GoDoc

This is an attempt to build a toolkit for developing smartwatch firmware in Go (using TinyGo).

Supported smartwatches:

  • PineTime (display, battery)
  • X9 Pro (display)
  • Desktop Linux (for simulation)

Supported features:

  • Display.
  • Battery charge indication. Not yet properly calibrated.

This repository contains some example firmwares that run on all devices that have all relevant features implemented:

  • examples/hello draws a yellow rectangle and some text, for quick testing of the smartwatch.
  • examples/battery shows the current battery charge estimation and additionally also draws the voltage on the screen.
  • examples/digitalclock shows a very basic digital clock. It draws the current hour/minute on the screen. The time may be incorrect as TinyGo does not currently support setting the time on bare-metal systems.

Running on a real smartwatch

You can flash one of the examples to a real smartwatch. For example, to run the digital clock example on a PineTime:

tinygo flash -target=pinetime-devkit0 github.com/aykevl/go-smartwatch/examples/digitalclock

Note: as of this time (2019-11-07), you will need the development version of TinyGo (the dev branch). Take a look here for information on how to build it from source.

PineTime running the digital clock example

Linux simulation

All features of this toolkit have been implemented for Linux as well, returning something that at least looks legitimate. This allows for quick edit/test cycles using go run. For example:

go run github.com/aykevl/go-smartwatch/examples/digitalclock

Linux simulation of the digital clock example

License

This toolkit has been licensed under the BSD 2-clause license.

You can’t perform that action at this time.