ms5803

1.0.1 • Public • Published

ms5803

Use MS5803-14BA on nodejs, e.g. RPi or similar SBC Tested to run on Raspberry PI 3

Installation

npm install ms5803
var ms5803 = require('ms5803')

var sensor = new ms5803();

Usage

This module supports both Promise style and node callback style of usage. Check the example.js for the basic usage.

var ms5803 = require('ms5803');
var sensor = new ms5803();

sensor.reset()
	.then(sensor.begin)
	.then((c)=>{
		console.log("calibration array: " + c);
	})
	.then(()=>{
		setInterval(()=>{
			sensor.measure()
			.then((r)=>{
				console.log("sensor readings:" + r);
			})
		}, 1000);
	})
	.catch((error)=>{
		console.error(error);
	});

Acknowledgements

Package Sidebar

Install

npm i ms5803

Weekly Downloads

5

Version

1.0.1

License

ISC

Unpacked Size

5.73 kB

Total Files

4

Last publish

Collaborators

  • andytsui