Git Product home page Git Product logo

Comments (5)

nrbrt avatar nrbrt commented on June 15, 2024

I manually copied the lib directory to the node_modules/motor-hat directory, together with the test directory and now npm run build completes successfully.
I tried running your the basic usage script and it showed me this:

/home/pi/node-projects/motor/node_modules/motor-hat/node_modules/i2c-bus/i2c-bus.js:423
    i2c.writeByteSync(peripheralSync(this, addr), cmd, byte);
        ^

Error: , Remote I/O error
    at Bus.writeByteSync (/home/pi/node-projects/motor/node_modules/motor-hat/node_modules/i2c-bus/i2c-bus.js:423:9)
    at setAllPWMSync (/home/pi/node-projects/motor/node_modules/motor-hat/dist/pwm.js:203:9)
    at Object.init (/home/pi/node-projects/motor/node_modules/motor-hat/dist/pwm.js:244:7)
    at Object.init (/home/pi/node-projects/motor/node_modules/motor-hat/dist/index.js:219:11)
    at Object.<anonymous> (/home/pi/node-projects/motor/test.js:1:75)
    at Module._compile (internal/modules/cjs/loader.js:1158:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
    at Module.load (internal/modules/cjs/loader.js:1002:32)
    at Function.Module._load (internal/modules/cjs/loader.js:901:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12) {
  errno: 121,
  code: '',
  syscall: 'writeByteSync'
}

That might be ok, since I do not actually have a motor hat attached to my pi. As soon as I get this going, I will try and create a node-red implementation using your module.

from motor-hat.

jcane86 avatar jcane86 commented on June 15, 2024

from motor-hat.

nrbrt avatar nrbrt commented on June 15, 2024

awesome, thanks!

from motor-hat.

jcane86 avatar jcane86 commented on June 15, 2024

hi @nrbrt , just thought I'd give a quick update.

Sorry I haven't been able to cut the new release yet, but I'm working on it. Should be out by this weekend for sure.

Cheers!

from motor-hat.

jcane86 avatar jcane86 commented on June 15, 2024

@nrbrt , I've just published v2.0.10 of motor-hat, which should solve your initial problem. If you install directly from npm now it should work for you (as long as you have the motor hat connected).

I'll close this issue for now, feel free to reopen if you're still having problems with this.

Cheers

Pepe

from motor-hat.

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.