Skip to content
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

LED PWM fades #129

Open
Boombostak opened this issue May 8, 2020 · 5 comments
Open

LED PWM fades #129

Boombostak opened this issue May 8, 2020 · 5 comments

Comments

@Boombostak
Copy link

I have a project that requires an LED that slowly fades up and down in intensity.

I'm not seeing a way to achieve this within PiPresents.

I have a pyton program that achieves this, but when PiPresents launches concurrently, the LED stops fading (usually in some intermediate level of brightness). I need to do more reading to better speculate what might be happening.

Just wondering if this is a problem that has been tackled in the past - a search of the issues did not turn up anything about PWM.

Thanks!

@KenT2
Copy link
Owner

KenT2 commented May 8, 2020

PP cannot fade the GPIO, although it could be added to pp_gpiodriver.py

Your fade probably stops because Pi Presents is also using the gpio. If you do not need to use the gpio in Pi Presents then disable it by removing gpio.cfg from /pp_io_config in the profile and /pp_io_config in /pipresents
If that does not solve the problem then tell me as it might be a bug.

@Boombostak
Copy link
Author

I do need to use GPIO to run a pushbutton. It's simple setup, one pushbutton that fires the video and one LED that fades in and out as an attract feature.

I'm wondering if there is a way to release specific pins from PiPresents? I don't really know the language for this as this is a new problem for me.

@KenT2
Copy link
Owner

KenT2 commented May 8, 2020

Pi Presents uses RPi.GPIO

if you set the direction of the pin to none in gpio.cfg PP does nothing with the pin.

PP does set the mode to Board, I don't know what happens if your program uses the other mode.

@lalo-uy
Copy link

lalo-uy commented May 13, 2020

Maybe a Animation plugin that launches a separated program in background.
That way the fading program can be started, or any other one by the way.

@KenT2
Copy link
Owner

KenT2 commented May 14, 2020

I think I shall implement blink and fade by a pwm extension to pp_gpiodriver.py. However I like your idea of an I/O plugin that can run an external process. Might also be worth doing a track plugin that does the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants