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 error #2

Open
saiparvathi opened this issue Jul 12, 2018 · 1 comment
Open

pwm error #2

saiparvathi opened this issue Jul 12, 2018 · 1 comment

Comments

@saiparvathi
Copy link

saiparvathi commented Jul 12, 2018

Hi
I am running ubuntu 18 on rock64 and I am trying to run my servo motor through pwm gpio pins .

I am facing an pwm error when I tried to run example program provided in your repo

python R64-GPIO-test.py

error

Testing R64.GPIO Module...

Module Variables:
Name Value


GPIO.ROCK ROCK
GPIO.BOARD BOARD
GPIO.BCM BCM
GPIO.OUT out
GPIO.IN in
GPIO.HIGH 1
GPIO.LOW 0
GPIO.PUD_UP 0
GPIO.PUD_DOWN 1
GPIO.VERSION 0.6.3
GPIO.RPI_INFO {'P1_REVISION': 3, 'RAM': '1024M', 'REVISION': 'a22082', 'TYPE': 'Pi 3 Model B', 'PROCESSOR': 'BCM2837', 'MANUFACTURER': 'Embest'}
Error: Unable to export GPIO
Error: Unable to set GPIO direction
Error: Unable to export GPIO
Error: Unable to set GPIO direction

Testing GPIO Input/Output:
You must setup() the GPIO channel (BOARD 16) first
Output State : None
You must setup() the GPIO channel (BOARD 16) as an output first
You must setup() the GPIO channel (BOARD 18) first
Input State : None

Waiting 3 seconds for interrupt...
You must setup() the GPIO channel (BOARD 18) as an input first
Timeout!
You must setup() the GPIO channel (BOARD 16) as an output first

Testing PWM Output - DutyCycle - High Precision:
60Hz at 50% duty cycle for 1 second
Traceback (most recent call last):
File "R64-GPIO-test.py", line 67, in
p.start(50)
File "/home/rock64/sdl/sen/Rock64-R64.GPIO/R64/_GPIO.py", line 351, in start
self.pwm_calc()
File "/home/rock64/sdl/sen/Rock64-R64.GPIO/R64/_GPIO.py", line 368, in pwm_calc
self.sleep_low = (1.0 / self.freq) * ((100 - self.dutycycle) / 100.0)
AttributeError: PWM instance has no attribute 'freq'

@sdvcrx
Copy link

sdvcrx commented Jul 29, 2018

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