About

Cylon.js is a JavaScript framework for robotics, physical computing, and the Internet of Things using Node.js.

It provides a simple, yet powerful way to create JavaScript robots that incorporate multiple, different hardware devices at the same time.

Want to use Ruby on robots? Check out our sister project Artoo (http://artoo.io)

Want to use the Go programming language to power your robots? Check out our sister project Gobot (http://gobot.io)

Meet The Code

Cylon.js makes it incredibly simple and fun to command robots.

All you need to get started is the `cylon` npm module:

npm install cylon

Then install modules for whatever hardware support you want to use from your robot.

Examples

Arduino:

Install modules for whatever hardware support you want to use from your robot. For the example below, an Arduino using the Firmata protocol:

npm install cylon-firmata

This example connects to an Arduino, and every second turns the LED either on, or off.

var Cylon = require("cylon");

// Initialize the robot
var robot = Cylon.robot({
  // Change the port to the correct port for your Arduino.
  connection: { name: 'arduino', adaptor: 'firmata', port: '/dev/ttyACM0' },
  device: { name: 'led', driver: 'led', pin: 13 },

  work: function(my) {
    // we do our thing here
    every((1).second(), function() { my.led.toggle(); });
  }
});

// start working
robot.start();

ARDrone:

For this example, you need to install the module with the adaptor and drivers for the ARDrone from Parrot:

npm install cylon-ardrone

This example connects to an ARDrone, and then simply takes off, and lands.

var Cylon = require('cylon');

Cylon.robot({
  connection: { name: 'ardrone', adaptor: 'ardrone', port: '192.168.1.1' },
  device: { name: 'drone', driver: 'ardrone' },

  work: function(my) {
    my.drone.takeoff();
    after(10..seconds(), function() { my.drone.land(); });
    after(15..seconds(), function() { my.drone.stop(); });
  }
}).start();

More Examples

We've got lots more examples here to help you get started.

Platform Support

Cylon.js has a extensible system for connecting to hardware devices. The following robotics and physical computing system, and software platforms, are currently supported:

21 Platforms

Support for many devices that use General Purpose Input/Output (GPIO) have a shared set of drivers provided using the cylon-gpio module:

10 GPIO drivers

Support for devices that use Inter-Integrated Circuit (I2C) have a shared set of drivers provded using the cylon-i2c module:

6 I2C drivers

See more drivers here

More platforms and drivers are coming soon...

CLI

Cylon uses the Gort (http://gort.io) Command Line Interface (CLI) so you can access important features right from the command line. We call it "RobotOps", aka "DevOps For Robotics". You can scan, connect, update device firmware, and more!

Cylon also has its own CLI to generate new robots, adaptors, and drivers.

Check out the Cylon CLI docs here.

Be Part Of The Robot Evolution