Coder Social home page Coder Social logo

Comments (10)

RobQuistNL avatar RobQuistNL commented on July 20, 2024

Same issue here... Using pigpio i can write to the pins (pigs p 17 |0 - 255| ) and do the same for pin 22 and 24, but when i open them here with GPIO pins i get the message "Unkonwn PWN channel" as well

from node-rpio.

jperkin avatar jperkin commented on July 20, 2024

Only certain pins support PWM. On 26-pin variants you can only use GPIO18/P12, whereas on the 40-pin variants you can use GPIO12/Pin32, GPIO13/Pin33, GPIO18/Pin12, or GPIO19/Pin35. There is a sentence to this effect in the README above the example, perhaps one of you can suggest better wording for either the README or the error message to make this more obvious? Thanks.

from node-rpio.

RobQuistNL avatar RobQuistNL commented on July 20, 2024

Well, the weird thing is that if I use other tools, such as pigpio, it does work as a PWM pin. Or am I missing something? I mean, i can use pigpio to write 0 to 255 to a pin and the MOSFET on that pin works accordingly (powering my ledstrip)

from node-rpio.

jperkin avatar jperkin commented on July 20, 2024

I'm not familiar with that software, but my guess (really the only explanation) is that it's simply doing software PWM, i.e. manually toggling the pins itself to generate PWM output. My module doesn't support that, at least not natively (you can always implement it yourself with a suitable for loop), but does support hardware PWM using the pins specified, which is much more efficient.

from node-rpio.

jperkin avatar jperkin commented on July 20, 2024

I've added a paragraph attempting to explain this in the README.

from node-rpio.

RobQuistNL avatar RobQuistNL commented on July 20, 2024

Ah right. In that case I guess this can be closed, right? Maybe add a nice to have feature that supports software PWM (didn't even know that was possible, thanks! 👍 ).

Thanks for the quick replies! :)

from node-rpio.

jperkin avatar jperkin commented on July 20, 2024

I'll close this for now, but adding software PWM seems like something I could add support for at some point. Cheers.

from node-rpio.

jaqua avatar jaqua commented on July 20, 2024

@RobQuistNL How did you solve your pwm-issue? I'm also trying to power a led strip via software pwm...

from node-rpio.

RobQuistNL avatar RobQuistNL commented on July 20, 2024

I think I used middleware and used pigpio, but its been a long time, don't really recall - Sorry!

from node-rpio.

eltoroit avatar eltoroit commented on July 20, 2024

Any update on software PWM?

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.