Skip to content

fourcube/detect-rpi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Detects if node is running on a Raspberry Pi.

Resources

License

Stars

Watchers

Forks

Packages

No packages published