Pinoccio Power


For more information click here.

How To Connect

Install the module with: npm install cylon-pinoccio

Cylon.robot({
  connections: {
    pinoccio: {
      adaptor: 'pinoccio',
      token: 'XXX',
      troop: '1',
      scout: '1'
    }
  },

  devices: {
    power: { driver: 'pinoccio-power' }
  },

});

How To Use

var Cylon = require('cylon');

Cylon.robot({
  connections: {
    pinoccio: {
      adaptor: 'pinoccio',
      token: 'XXX',
      troop: '1',
      scout: '1'
    }
  },

  devices: {
    power: { driver: 'pinoccio-power' }
  },


  work: function(my) {
    every((3).seconds(), function() {
      my.power.voltage(function(err, data){
        console.log(err);
        console.log(data);
      });
    });
  }
}).start();

Commands

isCharging

Checks whether or not the Pinoccio's battery is charging

Params

  • callback (Function) to be triggered when information is available

Returns

  • (undefined)

percent

Gets the current battery percentage

Params

  • callback (Function) to be triggered when information is available

Returns

  • (undefined)

voltage

Gets the current battery voltage

Params

  • callback (Function) to be triggered when information is available

Returns

  • (undefined)

enableVcc

Enables VCC on the battery

Returns

  • (undefined)

disableVcc

Disables VCC on the battery

Returns

  • (undefined)

report

Gets a report from the battery

Params

  • callback (Function) to be triggered when information is available

Returns

  • (undefined)

Compatibility