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

Add PWM Output #316

Merged
merged 36 commits into from
Nov 15, 2022
Merged

Add PWM Output #316

merged 36 commits into from
Nov 15, 2022

Conversation

brentru
Copy link
Member

@brentru brentru commented Sep 8, 2022

This pull request adds PWM output functionality to WipperSnapper.

Feature

  • Adds a new component, ws_pwm, to WipperSnapper for PWM output
    • Used to drive new components on Adafruit IO such as the Pizeo Buzzer and Servo
  • Adds new helper functions getChannel() and getInactiveChannel() to ws_ledc component.
    • Adds resolution to attachPin call.

Stability and refactoring

  • Refactors buildWSTopics() to check for malloc failures immediately after allocating topic strings.
  • Adds ESP32-x reset reason to serial output for enhanced debug output
  • Adds new function, generateDeviceUID(), which generates device UID. This functionality was previously within buildWSTopics().
  • Moves the ledc servo driver to new ledc/drivers folder

Testing notes:

  • PWM should be tested w/ ESP32, ESP32-S2, ESP8266, SAMD
  • Since there were changes to the ESP32-specific LEDC driver, both Servo and PWM should both be tested on ESP32

@brentru brentru requested a review from ladyada September 8, 2022 18:50
@brentru brentru mentioned this pull request Sep 27, 2022
@brentru
Copy link
Member Author

brentru commented Nov 15, 2022

Tested on ESP32, ESP8266

@brentru brentru merged commit 583bd8a into adafruit:main Nov 15, 2022
@brentru brentru deleted the add-pwm-patch branch November 15, 2022 17:14
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.

1 participant