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

Frequency problems with PWM signals #57

Open
rsnaet opened this issue Sep 30, 2022 · 0 comments
Open

Frequency problems with PWM signals #57

rsnaet opened this issue Sep 30, 2022 · 0 comments

Comments

@rsnaet
Copy link

rsnaet commented Sep 30, 2022

Hey,

I am having an issues using the PWM code in Visual Studio Code (Python), I am using an Asus Tinker Edge R.
When I run the code, I can only use a frequency of 1Hz. All other values give "OSError: [Errno 22] Invalid argument", it does not matter if I set the frequency to 0.1 or to 1e3. The problem stays the same.
How can I fix this?

    from periphery import PWM
    
    Chip = 1        #Chip1, Channel0 is PWM pin 33
    Channel = 0
    
    pwm = PWM(Chip, Channel)  
    pwm.frequency = 1
    print('freq set')
    pwm.duty_cycle=0.5
    print('duty cycle set')
    pwm.enable()

With kind regards.

@rsnaet rsnaet changed the title Problems with PWM signals Frequency problems with PWM signals Sep 30, 2022
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

1 participant