Sphero Instructions

Document created by gjsissons on Sep 23, 2016Last modified by gjsissons on Oct 7, 2016
Version 8Show Document
  • View in full screen mode

 

Overview

 

Sphero is a spherical robot toy designed by Sphero (the company). It is a white orb wrapped in polycarbonate plastic, capable of rolling around, changing colors, running programs, and being controlled by a smartphone or tablet. Much like Sphero, Ollie and other robots developed by Sphero use the same methods for communicating and navigating, so programs developed for one robot will typically work on all Sphero robots.

 

Rolling - Sphero robots can roll at a given speed and heading for a given amount of time.

Colors - Sphero robots can light up in any color.

Sensors - Sphero robot's internal sensors include an IMU and Locator

Bluetooth - Sphero robots connect to devices such an iPads, iPhones, and Android phones and tablets through Bluetooth.

Robot Languages - Sphero Robots support three programming languages on every Robot that can provide some basic autonomous functions. The easiest to learn and is used by our education program is Macros, followed by OrbBasic, and finally the latest and most powerful, OVAL. These languages all provide autonomous functionality for fast changing colors or other feedback that would normally be limited to the 12 commands per second limit when communicating with a host device.

o Macros - proprietary Macro language

o OrbBasic - Basic interpreter

o Oval - streaming C based language

 

 

Technical Features

 

  • Control System & Motors - Sphero robots have a complex stabilization and control system that provides an easy way to move the robot using 'roll' commands, yet provides direct access to the internal motors by bypassing the control system.
  • Lights - Sphero robots have two LEDs, a main RGB Led and a blue tail-light that are independently accessible via the API and SDKs.
  • Sensor data is available via the sensor streaming API/SDK Commands. Sensors include a very accurate IMU, Collision Detection algorithm, and Locator.
  • IMU - Sphero robots contain a powerful Inertial Measurement Unit (IMU) used to stabilize the robot during navigation. The Sphero IMU contains an Accelerometer and Gyrometer which can be used as inputs to sense freefall, jumps, tricks, and human handling of the robot.
  • Collision Detection - Every Sphero robot contains a complex collision detection algorithm. Since this algorithm needs very high fidelity IMU data to correctly detect collisions and can be slightly different based on the robots mechanical design it has been implemented on the Robot instead of streaming the data back to the host device.
  • Locator - Sphero Locator is a feature that provides real-time 2D position and velocity information about the robot. Much like IMU data, Locator data is available via the Streaming protocol in the SDKs.

 

Unboxing & Setup

 

Each team (limits will apply) that is interested in accepting the Sphero Vantiv challenge will receive a new Sphero device.

 

Rather than re-invent the wheel and explain how to unbox and get started with the Sphero ourselves, see this excellent YouTube video. (Thank you Dr Duu!)

 

The video covers the basics of unpacking the device, charging it and downloading apps for iOS or Android that can be used to control the device via Bluetooth.

 

unboxing_sphero.PNG

Documentation that explains how to setup and connect to your device via Bluetooth is also available here.

 

Writing Code

 

Several apps are available for both Android and iOS and there are many programming environments for Sphero.

 

As mentioned above, there are three different languages that actually "run" on the robot. Hyperlinks to documentation for each language are provided below.

 

o Macros - proprietary Macro language

o OrbBasic - Basic interpreter

o Oval - streaming C based language

 

The easiest to learn and use is Macros, followed by OrbBasic, and finally the latest and most powerful, Oval. Keep in mind though - the computing environment onboard the Sphero is limited. For example, the device has no WiFi and no ability to initiate a TCP/IP connect to Vantiv's eCommerce service. These languages can definitely be part of your solution, but you'll probably want to look at various SDKs for Sphero as well

 

Sphero's SDK

Sphero provides SDKs available for various platforms that can be used to control and interact with the Sphero device. The most commonly targeted platforms seem to be iOS, Android or OS/X. There is also a community JavaScript API available that looks interest as well as several other community APIs.

 

There are lots of choices for developers where Sphero is concerned.

 

One of the best places to start is to look at the Sphero SDK documentation at http://sdk.sphero.com/sphero-robot-basics/what-is-sphero/. or visit https://developer.gosphero.com/ . A Summary of useful resources from Sphero are below:

 

 

Official SDKs and samples

 

These SDKs are references from the Sphero Developer Center.

 

 

Unofficial SDKs and samples

 

 

Using Vantiv's eComm services

 

At some point, if you accept this challenge, you'll need to make Sphero interact with Vantiv's eCommerce payment APIs. You can connect to Vantiv's cloud resident endpoints from any device that can POST and GET XML via an SSL protected TCP/IP connection.

 

You can do this from any device of course including mobile devices. Sphero has rich SDKs supporting multiple platforms, so you have lots of choices here. If you decide to target iOS or Android for your deployment, you have several ways you can interact with Vantiv for payments:

 

  • Your mobile application can interact with a server, that in turn interacts with Vantiv's eCommerce servers for processing payment transactions (this is the approach most merchants use)
  • You can connect to Vantiv's endpoints directly from your mobile device (it's your application after all!)
  • For bonus points you can use an interface like eProtect to avoid your device being exposed to sensitive payment card data
  • You can even look at using services like Apple Pay or Android Pay and using the payment tokens returned by these services to process payments.

 

Here is some information that can help you get started quickly with the Vantiv eCommerce interface:

 

  • A quick tutorial showing how to interact with Vantiv's XML-based HTTPS POST API is provided here here. You can find simple cURL scripts in the GitHub repository.
  • More resources including complete documentation for Vantiv's eCommerce platform are available here: eCommerce

 

 

Privacy Policy, Copyright Notices, and Terms of Use

Sphero, Orbotix, Ollie, OrbBasic, Dr. Duu and Oval are registered or unregistered marks belonging to their respective owners who are unaffiliated with and do not endorse or sponsor Vantiv. Vantiv likewise does not endorse or sponsor Sphero, Orbotix or any of the non-Vantiv products or technologies references in this article.

Attachments

    Outcomes