-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Software PWM fails to work on Pi 1 #268
Comments
I'm not sure on which pin PWM is supported on Pi 1. Or does this help? |
Hardware PWM isn't supported on that pin, hence the use of the software one. Perhaps there is an issue with the software PWM? It worked with Pi4J v1… |
ah sorry, indeed I missed the PWM type setting you are using ;-) |
I believe Pi4j V1 used wiringPi for the native interface. V2 uses Pigpio native interface. Pigpio website says it works with any version of the Pi. I also verified your code work expectantly on a Pi4. Is your Pi1 the 26 or 40 pin connector ? |
It's the original 26 pin connector. The documentation page is where I got the original code from. I'm still quite surprised at the name having to be BCM17 (in my case). That was reported as a requirement some time ago. |
Well that took a long time, but I have a solution. In the non-working code I called It would appear that |
Good find @hackerjimbo! Is this a missing part in the documentation, or do you think an error in the implementation? |
and as always, thanks for the support @taartspi :-) |
I would say it's an error in the implementation. In the non-working code I set it to be on and then just changed the duty cycle. It had an initial duty cycle (from the configuration) of 50% so I think most users would expect the Oh, hang on! I've just releasised. The |
Yes, I still have an original Pi 1.
I'm porting the last piece of my Pi4J v1 software to the latest v2.3.0. It all works apart from the software PWM.
I set it up as follows:
And then move from the initial 50% duty cycle. I can print out the values of pwm.actualFrequency(), pwm.address(), pwm.dutyCycle() and pwm.isOn () and they seem to change fine.
However, it appears that the output pin is just left floating!
Any ideas? Setting the id to BCM17 was something else I found in the issues, but that doesn't seem to have helped.
The text was updated successfully, but these errors were encountered: