Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix set_pwm_freq() for ATtinys #125

Merged
merged 2 commits into from
Nov 9, 2023

Conversation

caternuson
Copy link
Contributor

For #116 (got issue number wrong in PR fork name)

NOTE: The pwm_pins for attiny8x7 and attinyx16 have been set to include pins for both 8 bit PWM mode and 16 bit PWM mode (a more recent firmware feature). However, only one mode will actually be built into the firmware. There is currently no way to query this from the firmware so that pwm_pins could be adjusted at runtime.

Tested on an ATtiny816 seesaw breakout with this code:

import board
from adafruit_seesaw import seesaw
ss = seesaw.Seesaw(board.STEMMA_I2C())
ss.set_pwm_freq(11, 50)

BEFORE
no output, so waiting forever to trigger
before

AFTER
expected output on pin 11
after

@caternuson caternuson requested a review from a team November 7, 2023 22:58
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@caternuson caternuson merged commit 4bc09f8 into adafruit:main Nov 9, 2023
1 check passed
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Nov 14, 2023
Updating https://github.com/adafruit/Adafruit_CircuitPython_LPS2X to 3.0.5 from 3.0.4:
  > Merge pull request adafruit/Adafruit_CircuitPython_LPS2X#14 from xrstf/patch-1

Updating https://github.com/adafruit/Adafruit_CircuitPython_Seesaw to 1.16.0 from 1.15.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_seesaw#125 from caternuson/iss166_set_pwm_freq
  > Merge pull request adafruit/Adafruit_CircuitPython_seesaw#124 from caternuson/iss121_comment
  > Merge pull request adafruit/Adafruit_CircuitPython_seesaw#123 from caternuson/eeprom_i2c_addr

Updating https://github.com/adafruit/Adafruit_CircuitPython_Wii_Classic to 1.0.4 from 1.0.3:
  > Merge pull request adafruit/Adafruit_CircuitPython_Wii_Classic#3 from adafruit/BlitzCityDIY-patch-1

Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA:
  > Updated download stats for the libraries
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants