Comments (4)
How would you use this library on a Mac that doesn't have gpio pins?
from node-rpio.
This library only supports Raspberry Pi and similar devices that expose GPIO interfaces. If there's something in the documentation that lead you to believe it might somehow be useful on Macs or other desktop computers then please let me know.
from node-rpio.
@jperkin Sorry for the late follow up here. I'm referring to running in mock mode.
From the documentation:
This module will only interface with hardware on Linux, but should compile on any other platform, where it will run in mock mode by default.
On an intel mac, mock mode works fine. On an m1, you receive the error.
from node-rpio.
In that case I'd check with whatever you are using for install of nodejs, seems like it's defaulting to building x86_64
objects which is wrong.
If I use the nodejs and npm packages from my pkgsrc repository (https://pkgsrc.joyent.com/install-on-osx/) it works fine:
$ uname -rsm
Darwin 21.4.0 arm64
$ npm install rpio
added 4 packages, and audited 5 packages in 12s
found 0 vulnerabilities
$ file node_modules/rpio/build/Release/rpio.node
node_modules/rpio/build/Release/rpio.node: Mach-O 64-bit bundle arm64
$ node -e "var rpio = require('rpio'); rpio.init();"
WARNING: Hardware auto-detect failed, running in raspi-3 mock mode
from node-rpio.
Related Issues (20)
- How to use Waveshare epaper HOT 1
- detect_pinmap hard codes /proc/device-tree/model causing docker issues
- Raspberry pi zero 2 w supports? HOT 4
- Banana Pi M2 Zero supports SPI with this library? HOT 1
- raspberry pi chrashing when pluggin cable into the gpio pin 39
- question about functionality HOT 2
- Issues with timing on poll HOT 2
- Compilation Warnings HOT 1
- Orange Pi Zero 2? HOT 2
- Bindings.js Error HOT 2
- Example with button polling HOT 1
- orangepi 5 support HOT 1
- How to set BCM2835_SPI_BIT_ORDER_MSBFIRST ?
- Node.js Exception
- Software PWM support?
- Update the lib for newer kernel apis for epoll_ctl
- Node 20 Support HOT 5
- spi chipselect disable ? I will control it myself
- Support for Raspberry Pi 5
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 node-rpio.