New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

gy-mcu90640-node

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gy-mcu90640-node

Handles serial communication with the MLX90540 based GY-MCU90640 infrared camera module.

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

gy-mcu90640-node

Handles serial communication with the MLX90540 based GY-MCU90640 infrared camera module. Only ever tested on Raspberry Pi.

Take a look at this article for some background information about the module in question, wiring etc.:

https://habr.com/en/post/441050/

Usage:

// Connect to the camera on /sev/serial0 (on Raspberry Pi)
const camera = require('gy-mcu90640-node')('/dev/serial0', {
	// Callback for reading the current emissivity
  onEmissivity: em => {
    console.log('Emissivity:', em)
  },
	// Callback for handling the temperature data
  onTemperatures: (temperatures, ambient) => {
    console.log('Temperatures: ', temperatures)
    console.log('Ambient:      ', ambient)
  }
})

// Set target emissivity.
setTimeout(camera.emissivity, 0, 0.95)

// Request a single frame after 100s (the module needs a bit of time to react)
setTimeout(camera.query, 100)

// Request emissivity
setTimeout(camera.emissivity, 1000)

// Switch to contonuous reading
setTimeout(camera.automatic, 2000)

// Terminate automatic reading by requesting a single frame
setTimeout(camera.query, 5000)

// Terminate the process
setTimeout(() => process.exit(0), 12000)

Keywords

infrared

FAQs

Package last updated on 01 Dec 2019

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