1.5.0 • Published 2 months ago

detect-rpi v1.5.0

Weekly downloads
312
License
MIT
Repository
github
Last release
2 months ago

npm version

detect-pi

Detect if node is currently running on a raspberry pi.

Usage

npm install detect-rpi --save

const isPi = require('detect-rpi');

if (isPi()) {
  console.log('Running on Raspberry Pi!');
} else {
  // ...
}

How?

Reads /proc/cpuinfo and checks for the hardware model.