Git Product home page Git Product logo

artoo-pebble's Introduction

Artoo Adaptor For Pebble

This repository contains the Artoo (http://artoo.io/) adaptor for the Pebble smart watch (http://getpebble.com/). It uses the pebblewatch gem (https://github.com/hybridgroup/pebblewatch) to perform all communication.

Artoo is a open source micro-framework for robotics using Ruby.

For more information abut Artoo, check out our repo at https://github.com/hybridgroup/artoo

Code Climate Build Status

Installing

gem install artoo-pebble

Using

require 'artoo'

connection :pebble, :adaptor => :pebble, :port => "127.0.0.1:4567", :id => "378B"
device :watch, :driver => :pebble

def button_push(*data)
  puts data[1].button unless data[1].nil?
end

work do
  on watch, :media_control => :button_push

  watch.set_nowplaying_metadata("Artoo", "Hello", Time.now.to_s)
  every(5.seconds) do
    watch.set_nowplaying_metadata("Artoo", "Update...", Time.now.to_s)
  end
end

Connecting to Pebble

This software requires version 1.12.0 of the Pebble watch firmware.

OSX

The main steps are:

  • Pair your computer and the Pebble
  • Use a socket to serial connection to map a TCP socket to the local port
  • Connect to the device via Artoo

To figure out which port your pebble is connected to, use the artoo connect scan command:

$ artoo connect scan

Now you are ready to connect to the Sphero using the socket, in this example port 4567:

artoo connect serial pebble 4567

Ubuntu

The main steps are:

  • Pair your computer and the Pebble
  • Map your device to a port
  • Use a socket to serial connection to map a TCP socket to the local port
  • Connect to the device via Artoo

You will need to pair with the Pebble, entering any needed password.

Then you can find the Bluetooth address, for example 00:18:33:86:37:8B, by using the artoo connect scan command:

$ artoo connect scan

Once you know the address, you can use the artoo connect bind command to map a port to the device:

artoo connect bind 00:18:33:86:37:8B pebble

Now you are ready to connect to the Pebble using a socket, in this example port 4567:

artoo connect serial pebble 4567

Windows

We are currently working with the Celluloid team to add Windows support. Please check back soon!

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.