@novavisionspa/eva-utils
collection of hw management APIs
Last updated 3 years ago by novavision .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @novavisionspa/eva-utils 
SYNC missed versions from official npm registry.

eva-utils

collection of hw management APIs

Installation

npm i @novavisionspa/eva-utils

API

Serial

returns a callback with the CPU serial as a string parameter

  • ERR000 for all platforms excepts the raspberrypi
  • [serial] of the CPU for raspberrypi platform
var device = require('@novavisionspa/eva-utils');
device.serial(function(serial){
  console.log(serial); // -> string
});

readDateTime

returns a callback with a date as a string parameter

  • Mon May 2 09:35:11 UTC 2016 output format example
var device = require('@novavisionspa/eva-utils');
device.readDateTime(function(error,dateTime){
  if (error) {
    console.log(error);
  } else {
    console.log(dateTime); // -> string
  }
});

setDateTime

returns a callback with a date as a string parameter (for ACK)

  • 2 OCT 2006 18:00:00 input format example
var device = require('@novavisionspa/eva-utils');
device.setDateTime(`2 OCT 2006 18:00:00`,function(error,dateTime){
  if (error) {
    console.log(error);
  } else {
    console.log(dateTime); // -> string
  }
});

readRtc

returns a callback with a date as a string parameter

  • Mon 02 May 2016 11:13:38 AM UTC -0.244577 seconds output format example
var device = require('@novavisionspa/eva-utils');
device.readRtc(function(error,dateTime){
  if (error) {
    console.log(error);
  } else {
    console.log(dateTime); // -> string
  }
});

writeRtc

writes the current date to RTC. Returns a callback with an error object

var device = require('@novavisionspa/eva-utils');
device.writeRtc(function(error){
  if (error) {
    console.log(error);
  } else {
    console.log('success'); // -> string
  }
});

buzz

var evautils = require('@novavisionspa/eva-utils');

evautils.buzz(100); // accepts milliseconds, returns error obj

alert

var evautils = require('@novavisionspa/eva-utils');

evautils.alert(); // returns error obj

rts (yellow LED)

var evautils = require('@novavisionspa/eva-utils');

evautils.rts(); // returns error obj

error (red LED)

var evautils = require('@novavisionspa/eva-utils');

evautils.error(); // returns error obj

Current Tags

  • 0.4.2                                ...           latest (3 years ago)

2 Versions

  • 0.4.2                                ...           3 years ago
  • 0.4.1                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 2
Dependencies (2)
Dev Dependencies (0)
None

Copyright 2014 - 2017 © taobao.org |