adafruit / Adafruit_CircuitPython_Bundle

A bundle of useful CircuitPython libraries ready to use from the filesystem.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PulseIO pwm output problem on Raspberry pi 3

cetinkayafaruk opened this issue · comments

I tried to run pwm example circuit python on raspberry pi but I am getting some error. How can I solve the problem ? Is Raspberry pi supported PulseIO library?

Example :
https://circuitpython.readthedocs.io/en/3.x/shared-bindings/pulseio/PWMOut.html

import pulseio
import board

pwm = pulseio.PWMOut(board.D16, frequency=50)
pwm.duty_cycle = 2 ** 15

Output:
Traceback (most recent call last):
File "/home/pi/Desktop/circuitpython_test_pwm.py", line 5, in
pwm = pulseio.PWMOut(board.D16) # output on D16
AttributeError: module 'pulseio' has no attribute 'PWMOut'

Do you have a file called pulseio.py somewhere on your device?

pulseio isnt suported on Pi yet