Sha256: b03b597a18ac56200fc7e27cd1ce6cf7af3d3fc14c143582025f237374a735f0

Contents?: true

Size: 1.54 KB

Versions: 1

Compression:

Stored size: 1.54 KB

Contents

# Artoo Adaptor For Sphero

This repository contains the Artoo (http://artoo.io/) adaptor for the Sphero (http://gosphero.com) robot.

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](https://codeclimate.com/github/hybridgroup/artoo-sphero.png)](https://codeclimate.com/github/hybridgroup/artoo-sphero) [![Build Status](https://travis-ci.org/hybridgroup/artoo-sphero.png?branch=master)](https://travis-ci.org/hybridgroup/artoo-sphero)

## Installing

```
gem install artoo-sphero
```

## Using

```ruby
require 'artoo'

connection :sphero, :adaptor => :sphero, :port => '/dev/rfcomm0' #linux
device :sphero, :driver => :sphero
  
work do
  @rolling = false

  every(3.seconds) do
    puts "Rolling..."
    sphero.roll 90, rand(360)
  end
end
```
## Connecting to Sphero

### OSX / Linux

The main steps are:
- Pair your computer and the Sphero
- Map your device to a unix port
- Connect to the device via Artoo

First pair your computer and Sphero. You might be prompted for a passcode, but you do not need to enter it, sinec the Sphero does not check.

Once paired, use the `artoo scan serial` command to find out your connection info:

```
$ artoo scan serial
```

Now you are ready to connect to the Sphero, update the code to use correct serial port:

```
connection :sphero, :adaptor => :sphero, :port => '/dev/rfcomm0' #linux
```

### Windows

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
artoo-sphero-1.4.0 README.md