Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nodeimu

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nodeimu - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

22

package.json
{
"name": "nodeimu",
"version": "1.0.2",
"description": "Native addon for accessing IMU sensors using RTIMULib2",
"version": "1.0.3",
"description": "Native addon for accessing IMU/pressure/humidity/temperature sensors using RTIMULib2",
"license": "BSD-2-Clause-FreeBSD",

@@ -12,8 +12,16 @@ "author": "Jan Rupnik <jan.rupnik@ijs.si>",

"main": "./index.js",
"engines": {
"node": "0.12.7"
"dependencies": {
"nan": "~2.1.0"
},
"dependencies": {
"nan": "^2.1.0"
}
"keywords": [
"raspberry",
"pi",
"sense",
"hat",
"RTIMULib",
"IMU",
"pressure",
"humidity",
"temperature"
]
}
# nodeimu
Nodejs 0.12 bindings for accessing IMU data using RTIMULib2.
Nodejs bindings for accessing IMU/pressure/humidity/temperature data using RTIMULib2. The addon uses nodejs/nan. It has been tested on Sense HAT for Raspberry Pi.

@@ -10,3 +10,3 @@ ## Install

npm install node-gyp -g
node-gyp configure build
npm install
```

@@ -13,0 +13,0 @@

@@ -5,8 +5,9 @@ var util = require('util')

function dispAccel() {
var accel = IMU.getValue();
var sx = accel.x >= 0 ? ' ' : '';
var sy = accel.y >= 0 ? ' ' : '';
var sz = accel.z >= 0 ? ' ' : '';
var str = util.format('%s%s %s%s %s%s', sx, accel.x.toFixed(4), sy, accel.y.toFixed(4), sz, accel.z.toFixed(4));
console.log(str);
var data = IMU.getValue();
var sx = data.accelx >= 0 ? ' ' : '';
var sy = data.accely >= 0 ? ' ' : '';
var sz = data.accelz >= 0 ? ' ' : '';
var str = util.format('ax:%s%s ay:%s%s az:%s%s', sx, data.accelx.toFixed(4), sy, data.accely.toFixed(4), sz, data.accelz.toFixed(4));
var str2 = util.format(' t:%s p:%s h:%s', data.temperature.toFixed(4), data.pressure.toFixed(4), data.humidity.toFixed(4));
console.log(str + str2);
}

@@ -13,0 +14,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc