Nitrogen Pumpkin Mulch

    webscale

    0.0.3 • Public • Published

    WebScale

    Measure weight using a Stamps.com digital USB postage scale.

    Stamps.com 5-pound digital postage scale

    Hardware

    1. Sign up for free trial at Stamps.com.
    2. During signup, request a complimentary 5-pound digital postage scale. Pay $9.99 shipping and handling.
    3. Before the four-week trial is up, cancel your account and avoid the monthly fee.

    Installation

    $ npm install webscale
    

    In the event of installation trouble, refer to the node-hid documentation.

    Usage

    var WebScale = require('webscale');
    var webScale = new WebScale();
     
    webScale.on('change:weight', function(ounces){
        console.log(ounces + ' oz.');
    });

    See also test-client.js.

    Events

    change:weight

    Called whenever the scale's weight reading changes.

    Arguments

    • ounces how much weight is on the scale, in ounces. Can be negative if the scale was tared with weight on it.

    connected

    Called when the program first starts and connects successfully to the device, or when it reconnects after losing the connection.

    disconnected

    Called when the device is unplugged or powered off, and once per reconnect attempt.

    error

    An error with the USB device occurred (except disconnections, see above).

    Arguments

    • error The error from node-hid.

    Methods

    disconnect()

    Disconnect from the USB device.

    Install

    npm i webscale

    DownloadsWeekly Downloads

    2

    Version

    0.0.3

    License

    MIT

    Last publish

    Collaborators

    • aldaviva