Git Product home page Git Product logo

go-smartwatch's Introduction

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.

go-smartwatch's People

Contributors

aykevl avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.