Skip to content

Commit ee8fdf1

Browse files
authored
Merge pull request adafruit#28 from adafruit/dherrada-patch-1
Moved from pulseio.PWMOut to pwmio.PWMOut
2 parents 780553d + 7a23adf commit ee8fdf1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

cheatsheet/CircuitPython_Cheatsheet.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ You can use a PWM in one of two ways.
5656

5757
```import time
5858
import board
59-
import pulseio
59+
import pwmio
6060
61-
led = pulseio.PWMOut(board.D13, frequency=5000, duty_cycle=0)
61+
led = pwmio.PWMOut(board.D13, frequency=5000, duty_cycle=0)
6262
6363
while True:
6464
for i in range(100):
@@ -74,9 +74,9 @@ You can use a PWM in one of two ways.
7474

7575
```import time
7676
import board
77-
import pulseio
77+
import pwmio
7878
79-
piezo = pulseio.PWMOut(board.A1, duty_cycle=0, frequency=440, variable_frequency=True)
79+
piezo = pwmio.PWMOut(board.A1, duty_cycle=0, frequency=440, variable_frequency=True)
8080
8181
while True:
8282
for f in (262, 294, 330, 349, 392, 440, 494, 523):
@@ -91,11 +91,11 @@ You can use a PWM in one of two ways.
9191

9292
import time
9393
import board
94-
import pulseio
94+
import pwmio
9595
from adafruit_motor import servo
9696

9797
# create a PWMOut object on Pin A2.
98-
pwm = pulseio.PWMOut(board.A2, duty_cycle=2 ** 15, frequency=50)
98+
pwm = pwmio.PWMOut(board.A2, duty_cycle=2 ** 15, frequency=50)
9999

100100
# Create a servo object, my_servo.
101101
my_servo = servo.Servo(pwm)

0 commit comments

Comments
 (0)