Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions adafruit_seesaw/seesaw.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ def digital_write_bulk_b(self, pins, value):
else:
self.write(_GPIO_BASE, _GPIO_BULK_CLR, cmd)

def analog_write(self, pin, value):
def analog_write(self, pin, value, delay=0.001):
"""Set the value of an analog output by number"""
if pin not in self.pin_mapping.pwm_pins:
raise ValueError("Invalid PWM pin")
Expand All @@ -374,7 +374,7 @@ def analog_write(self, pin, value):
cmd = bytearray([offset, value])

self.write(_TIMER_BASE, _TIMER_PWM, cmd)
time.sleep(0.001)
time.sleep(delay)

def get_temp(self):
"""Read the temperature"""
Expand Down