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

PWM Duty cycle not correct #472

Open
Zounich opened this issue Jan 19, 2022 · 1 comment
Open

PWM Duty cycle not correct #472

Zounich opened this issue Jan 19, 2022 · 1 comment

Comments

@Zounich
Copy link

Zounich commented Jan 19, 2022

Hi vitormhenrique,

I am using octoprint on a Raspberry PI 2B.
With GPIO 23 I control a lamp via pwm.

image

After I have saved the configuration, I can dim the lamp.
However, I have 2 problems:

1: If I set 10% in the enclosure plugin, I get 16% on the GPIO.

2: The PWM signal is interrupted and for a few ms. the GPO spent 100%.

Here is the log:

2022-01-19 23:36:18,994 - octoprint.plugins.enclosure - INFO - Setting GPIO mode to BCM
2022-01-19 23:36:18,996 - octoprint.plugins.enclosure - INFO - Setting GPIO pin 13 as PWM
2022-01-19 23:36:18,998 - octoprint.plugins.enclosure - INFO - starting PWM on pin 13

When I check the GPIO configuration, GPIO 23 shows as OUT and not ALT0.

image

If I configure PWM via the terminal and control it there, it works without errors.

Do you have an idea where the cause for this could be?

Best Regards
Zounich

@vitormhenrique
Copy link
Owner

I have no clue what is going on. I use python libraries, so if you create scripts on python with the same libraries do the error still happens?
I'm guessing those are erros on the libraries.

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

No branches or pull requests

2 participants