Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sphero-connector-core

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sphero-connector-core

A thin wrapper round spherov2.js (unofficial API for Sphero® toys)

  • 0.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-80%
Maintainers
1
Weekly downloads
 
Created
Source

npm version Dependency Status devDependency Status Build Status Coverage

Sphero Connector Core

Sphero Connector Core

This is a thin (and partial) wrapper around the unofficial Sphero V2 API for Sphero toys used by Sphero Connector HTTP and Sphero Connector IPC.

API

Connect Toy

The following methods try to find a toy and establish a connection with it.

  • async connectSpheroMini()
  • async connectSpheroMiniWithName(toyName: string)
  • async connectLightningMcQueen()
  • async connectR2D2()
  • async connectR2Q5()
  • async connectBB9E()
  • async connectToy(toyType: string, toyName: string)

Valid values for toyType are: SpheroMini, LightningMcQueen, R2D2, R2Q5, BB9E.

If a toy is found and connected, an object with the following structure is returned.

{
  wake: function() { ... },
  sleep: function() { ... },
  setMainLedColor: function(hexColor: string) { ... }
}

Example: Connect Sphero Mini and set main LED color to red

const connector = require('sphero-connector-core');

const spheroMini = await connector.connectSpheroMini();

spheroMini.setMainLedColor('#FF0000');

License

Please be aware of the licenses of the components used in this project. Everything else that has been developed by the contributions to this project is under MIT License.

Keywords

FAQs

Package last updated on 27 Jan 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc