NicolasLeRoux / rpas

Remotely Piloted Aircraft System (Embedded system)
2 stars 1 forks source link

Node & GPIO #7

Open NicolasLeRoux opened 6 years ago

NicolasLeRoux commented 6 years ago

Tutorial here

NicolasLeRoux commented 6 years ago

See:

const os = require('os')
if (os.arch() == 'arm') { // Raspberry Pi
    i2c = require('i2c-bus');
} else {
    console.warn('Not using I2C');
    i2c = require('./i2c.mock.js');
}