Use MS5803-14BA on nodejs, e.g. RPi or similar SBC Tested to run on Raspberry PI 3
npm install ms5803varms5803=require('ms5803')varsensor=newms5803();This module supports both Promise style and node callback style of usage. Check the example.js for the basic usage.
varms5803=require('ms5803');varsensor=newms5803();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);});- This implementations is basically a javascript port from SparkFun Pressure Sensor Breakout
- Since javascript does not support 64-bit integer, Long is used to do 64-bit calculations.