adafruit / Adafruit_CircuitPython_ServoKit

CircuitPython helper library for the PWM/Servo FeatherWing, Shield and Pi HAT kits.
MIT License
69 stars 29 forks source link

Use unused PCA9685 FeatherWing's pin as inputs. #10

Closed bpjobin closed 4 years ago

bpjobin commented 4 years ago

Hi, I'm driving two servo motors using a Huzzah Feather esp8266 and a FeatherWing 8-channels PCA9685 board. Since this is leaving me with unused pins on wing board, I'd like to know if it's possible to use them as input pins to catch data from NC/NO switches or ultrasonic distance sensors.

self._button = Pin(5, mode=Pin.IN, pull=Pin.PULL_UP)

If so, how would I define one of those pins?

Thank you

ladyada commented 4 years ago

hiya, you can use anything other than SCL/SDA - note we don't support esp8266 on circuitpython anymore! if youre using micropython, check to see if they have any drivers for the pca9685 :)

bpjobin commented 4 years ago

I'm new to I2C protocol. What do you mean by:

you can use anything other than SCL/SDA

I'm using the latest version 3 of circuitpython released in august so it works for now. I'll make sure to ping the folks of micropython too.

ladyada commented 4 years ago

hiya you can use any gpio for inputs, OTHER than SDA/SCL pins