Comments (2)
I'm afraid spi-device
doesn't function on a mac.
It should be possible to avoid the Module did not self-register
error by replacing this:
const spi = require('spi-device');
with this:
let spi = null;
if (require('os').type() === 'Linux') {
spi = require('spi-device');
}
Everything should still function correctly on a Raspberry Pi. However, it will not be possible to use any spi-device
functionality on a mac as the variable spi
will be null
.
from spi-device.
Thanks @fivdi - that is a great solution.
from spi-device.
Related Issues (20)
- Help with spi-device and THAT5171 chip HOT 8
- SPI - question to control a push button with bitmap in SPI HOT 26
- Issue with Max31865 HOT 7
- can't change chipSelectHigh HOT 13
- Configure options not working HOT 16
- Fix tests HOT 1
- Uncaught Error: EINVAL, incorrect arguments passed to transferSync(message) HOT 3
- Crashed on open if options parameter is null or undefined
- node-gyp fails on armv7 32bit HOT 15
- USB to spi device
- Bump nan HOT 2
- Help Switch from Arduino sketch to Node HOT 1
- correct values for speedHz and maxSpeedHz settings on Raspberry Pi? HOT 2
- Fails to install on Rasperry Pi 2 B HOT 2
- GPIO pins as chip select HOT 5
- Can you please help me with this issue not able to install spi-device module HOT 6
- Drop support for Node.js v0.10, v0.12, v5 and v7 HOT 1
- Add platform-conditional directive around spidev include HOT 2
- can't find SPI device channel arguments! HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spi-device.