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

electron-microfet2

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

electron-microfet2

Electron library to access the MicroFet2 data

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

microFET2

Nodejs library to access the microFET 2 data

var MicroFET2 = require('electron-microfet2');

var sensor = new MicroFET2();

//listen for device found event and connect
sensor.on('found', (devices) => {
  devices.forEach((device) => {
    sensor.connect(device.id, device.name, device.port);
  });
});

//listen for connection and start streaming
sensor.on('connect', (device) => {
  console.log("microFET2 connected");
});

//listen for data
sensor.on('data', (data) => {
  console.log(data);
});

//look for devices to connect to
sensor.detect();

//close the connection after 5 seconds
setTimeout(function(){
    sensor.disconnect();
    console.log("microFET2 disconnected");
}, 5000);

Serial Data Stream For MicroFET 2, ErgoFET 150 and ErgoFET 300

  • 9600 baud, 8 data, 1 stop, no parity
  • 4 bytes are sent
  • byte.bit(0-7) example: 3.2 is set - third byte bit 2 set

Byte 1 = 255

2.7 1 NA

2.6 NA

2.5 1=low range 0=high range

2.4-2.1 NA

2.0 1=force reading negative (tension) 0=force reading positive (compression) ErgoFET only

byte 3 � Most significant 2 digits (99 maximum)

Byte 4 � least significant 2 digits (99 maximum)

Example: byte 3=12 and byte 4=26 then the force reading is 122.6 pounds

Keywords

FAQs

Package last updated on 12 Jan 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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