Nautilus: Pelagic Mollusc

    @novavisionspa/eva-utils-artik

    0.4.6 • Public • Published

    eva-utils-artik

    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-artik');
    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-artik');
    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-artik');
    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-artik');
    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-artik');
    device.writeRtc(function(error){
      if (error) {
        console.log(error);
      } else {
        console.log('success'); // -> string
      }
    });

    buzz

    var evautils = require('@novavisionspa/eva-utils-artik');
    
    evautils.buzz(100); // accepts milliseconds, returns error obj

    alert

    var evautils = require('@novavisionspa/eva-utils-artik');
    
    evautils.alert(); // returns error obj

    rts (yellow LED)

    var evautils = require('@novavisionspa/eva-utils-artik');
    
    evautils.rts(); // returns error obj

    error (red LED)

    var evautils = require('@novavisionspa/eva-utils-artik');
    
    evautils.error(); // returns error obj

    Install

    npm i @novavisionspa/eva-utils-artik

    DownloadsWeekly Downloads

    0

    Version

    0.4.6

    License

    Apache-2.0

    Unpacked Size

    21.9 kB

    Total Files

    5

    Last publish

    Collaborators

    • novavision