Skip to content

pwm error  #2

@saiparvathi

Description

@saiparvathi

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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions