Leapo / Rock64-R64.GPIO

Python GPIO library for the Rock64 SBC (RPi.GPIO clone)
GNU Lesser General Public License v3.0
60 stars 24 forks source link

gpio set error #5

Closed adityadotrastogi closed 5 years ago

adityadotrastogi commented 5 years ago

Hi, I am new to this board. Tried to port my code from to ROCK64. But even GPIO test file throws error. I have tried using different pins based on BCM,BOARD, Rock valid channels, but no luck. Any help on this is greatly appreciated.

Thanks

OUTPUT ##############################################################

`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 27) first Output State : None You must setup() the GPIO channel (BOARD 27) as an output first You must setup() the GPIO channel (BOARD 32) first Input State : None

Waiting 3 seconds for interrupt... You must setup() the GPIO channel (BOARD 32) as an input first Timeout! You must setup() the GPIO channel (BOARD 27) 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 71, in p.start(50) File "/home/rock64/camcode/R64/_GPIO.py", line 351, in start self.pwm_calc() File "/home/rock64/camcode/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'

adityadotrastogi commented 5 years ago

its done... permissions issue

ChrisSmith5 commented 5 years ago

I am having this same problem. Anyone have a resolution on this?

Thanks!

adityadotrastogi commented 5 years ago

Try using SUDO while running the command. It worked in my case