Cylon.js For ODROID
Cylon.js (http://cylonjs.com) is a JavaScript framework for robotics, physical computing, and the Internet of Things (IoT) using Node.js.
This module provides an adaptor for ODROID Linux computers (http://www.hardkernel.com/main/main.php).
Supported Odroid Boards
- Odroid XU4
- Odroid XU3
More devices to be added shortly...
How to Install
Installing Cylon.js is easy, and must be done on an Odroid Board with NodeJS.
$ npm install cylon cylon-odroid cylon-gpio cylon-i2c
How to Use
var Cylon = ;var odroid = ; // Initialize the robotCylonstart;
How to Use The XU4 ShifterShield
var Cylon = ;var odroid = ; // Initialize the robotCylonstart;
How to Use The XU4 12 Pin Header
var Cylon = ;var odroid = ; // Initialize the robotCylonstart;
How to Use Serial Communication
The Serial driver is a wrapper the node library : serialport. Use as if the driver is the package itself.
var Cylon = ;var odroid = ; // Initialize the robotCylonstart;
Options available
devices: serialDevice: driver: 'serial' baudRate: 57600 port: '/dev/ttyS0' parser: byteLength : 5 //The default port used is the Odroid Boards pin serial port//Parsers//Other parsers avaialableparser: byteDelimiter: 1012
Commands available are such as:
- write
- pause
- resume
- flush
- close
- update
- set
Looking for a something like serial.available()?
listen for the data event instead
myserialDevice;
Other events available
- open
- close
- error
- disconnect
You can checkout the serialport repo here or here
License
Copyright (c) 2017 ODROIDJS. Licensed under the Apache 2.0 license.