Coder Social home page Coder Social logo

M1 Mac support? about node-rpio HOT 4 CLOSED

sarink avatar sarink commented on August 20, 2024
M1 Mac support?

from node-rpio.

Comments (4)

waltsatan avatar waltsatan commented on August 20, 2024

How would you use this library on a Mac that doesn't have gpio pins?

from node-rpio.

jperkin avatar jperkin commented on August 20, 2024

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.

sarink avatar sarink commented on August 20, 2024

@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.

jperkin avatar jperkin commented on August 20, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.