1.0.0 • Published 7 years ago

naoqi v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
7 years ago

node-naoqi

NaoQi library for Node.js, it's inspired by qimessaging and provides a better interface for method calls and events.

Installation

$ npm install naoqi --save

Get Startted

const QiSession = require('naoqi').QiSession;
const session = new QiSession('your naoqi host or ip address');

// specify what services will be used later
session.using('ALTextToSpeech', 'tts');
session.using('ALBehaviorManager');

// start programming on this trigger
session.onload = function(loaded) {
  assert.deepEqual(this, session);
  this.tts.say('hello naoqi');
  this.behaviorManager.run('behavir path').then(() => {
    // get result from run
  });

  // register an event
  this.subscribe('robotIsWakeUp', (awake) => {
    console.log('when robot is wake up');
  });
};

Run test

$ npm test

License

MIT

1.0.0

7 years ago