Comments (10)
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.
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.
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.
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.
I've added a paragraph attempting to explain this in the README.
from node-rpio.
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.
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.
@RobQuistNL How did you solve your pwm-issue? I'm also trying to power a led strip via software pwm...
from node-rpio.
I think I used middleware and used pigpio, but its been a long time, don't really recall - Sorry!
from node-rpio.
Any update on software PWM?
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
- M1 Mac support? HOT 4
- 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.