detect-rpi

1.5.0 • Public • Published

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.

Dependents (17)

Package Sidebar

Install

npm i detect-rpi

Weekly Downloads

218

Version

1.5.0

License

MIT

Unpacked Size

2.99 kB

Total Files

4

Last publish

Collaborators

  • fourcube