Skip to content

Huge refactor, switch to PWMOut compatible API. #8

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

Merged
merged 3 commits into from
Jan 10, 2018

Conversation

tannewt
Copy link
Member

@tannewt tannewt commented Jan 6, 2018

This change reduces the scope of the PCA9685 driver to simply
providing PWMOut compatible objects for each channel. As a result,
the motor and servo can now be used with any PWM source, not just
the PCA9685. The new motor library is here:
https://github.com/adafruit/Adafruit_CircuitPython_Motor

Furthermore, this library is not aware of particular output configs
such as the specific Adafruit Motor FeatherWing. That knowledge has
been moved to a new FeatherWing library that handles all wing
related initialization. Its available here:
https://github.com/adafruit/Adafruit_CircuitPython_FeatherWing

Lastly, the new driver code and examples have been linted and
standard library files added. This part is related to adafruit/circuitpython#475

These two guides will need to be updated alongside the release:
https://learn.adafruit.com/micropython-hardware-pca9685-pwm-and-servo-driver/micropython?view=all#circuitpython
https://learn.adafruit.com/micropython-hardware-pca9685-dc-motor-and-stepper-driver/micropython?view=all

Fixes #6 and fixes #7.

This change reduces the scope of the PCA9685 driver to simply
providing PWMOut compatible objects for each channel. As a result,
the motor and servo can now be used with any PWM source, not just
the PCA9685. The new motor library is here:
https://github.com/adafruit/Adafruit_CircuitPython_Motor

Furthermore, this library is not aware of particular output configs
such as the specific Adafruit Motor FeatherWing. That knowledge has
been moved to a new FeatherWing library that handles all wing
related initialization. Its available here:
https://github.com/adafruit/Adafruit_CircuitPython_FeatherWing

Lastly, the new driver code and examples have been linted and
standard library files added.

Fixes adafruit#6 and fixes adafruit#7.
@tannewt tannewt requested review from tdicola and a team January 6, 2018 00:31
Copy link
Contributor

@kattni kattni left a comment

Choose a reason for hiding this comment

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

Clarification needed on 2 examples. Otherwise looks good! Tested successfully.

@@ -0,0 +1,43 @@
import time
Copy link
Contributor

Choose a reason for hiding this comment

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

Clarify what the calibration is for.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@@ -1,18 +1,18 @@
from board import *
from board import SCL, SDA
Copy link
Contributor

Choose a reason for hiding this comment

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

Clarify what simpletest is and how it should be used.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

tannewt referenced this pull request Jan 10, 2018
From a beginners perspective: 
I just spend an hour to test my newest servo. Filling my gabs with the documentation at http://micropython-pca9685.readthedocs.io/en/latest/index.html#. From my point of view it would be easier to have a more specific example plus the simpletest.py
This is may unesseary for advanched users, but very helpfull for bloody noobs like me.
@tannewt tannewt merged commit e985f91 into adafruit:master Jan 10, 2018
tannewt pushed a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Jan 10, 2018
Updating https://github.com/adafruit/Adafruit_CircuitPython_FXAS21002C to 1.0.0 from 0.8.0:
  > use struct when available, list comp instead of map() (adafruit/Adafruit_CircuitPython_FXAS21002C#2)

Updating https://github.com/adafruit/Adafruit_CircuitPython_FXOS8700 to 1.0.0 from 0.8.0:
  > use struct when available, change map() to list comp (adafruit/Adafruit_CircuitPython_FXOS8700#4)

Updating https://github.com/adafruit/Adafruit_CircuitPython_HT16K33 to 2.0.0 from 1.0.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_HT16K33#1 from tannewt/lint

Updating https://github.com/adafruit/Adafruit_CircuitPython_NeoPixel to 3.1.0 from 3.0.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_NeoPixel#21 from mrmcwethy/examples

Updating https://github.com/adafruit/Adafruit_CircuitPython_PCA9685 to 3.0.0 from 2.0.1:
  > Fix up ReadTheDocs. (adafruit/Adafruit_CircuitPython_PCA9685#9)
  > Huge refactor, switch to PWMOut compatible API. (adafruit/Adafruit_CircuitPython_PCA9685#8)

Updating https://github.com/adafruit/Adafruit_CircuitPython_SD to 3.1.0 from 3.0.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_SD#5 from mrmcwethy/examples

Updating https://github.com/adafruit/Adafruit_CircuitPython_SSD1306 to 2.2.0 from 2.1.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_SSD1306#8 from dhalbert/master
  > add bouncing ball example (adafruit/Adafruit_CircuitPython_SSD1306#6)

Updating https://github.com/adafruit/Adafruit_CircuitPython_SimpleIO to 1.0.1 from 1.0.0:
  > Changes to the tone function (adafruit/Adafruit_CircuitPython_SimpleIO#24)
  > Make lint happy
  > handle reversed range on output
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.

Include all boilerplate from cookiecutter. Switch to properties instead of weird functions.
2 participants