1

If I want to expand GPIO pin that can use as input/output on raspberry via I2C is whether I can use these pin with pigpio library?

  • 1
    I think the question is: When I use an I2C port expander like MCP23017, can I still use pigpio to address those I/O pins? To my best knowledge, you can't. But I may be wrong here. – kwasmich Oct 18 '16 at 15:09
  • 1
    @kwasmich You are correct. pigpio only directly talks to the GPIO on the expansion header. Your own software would be needed to talk to the additional GPIO connected to a port expander. wiringPi offers the ability to use port expander GPIO directly, but only for read and write (i.e. not for PWM or alerts on pin state change). – joan Oct 18 '16 at 19:12
  • 1
    thanks @joan, Since I want expand GPIO pin to can generate PWM on them by pigpio library (may be is 50 GPIO pin). Do you know any method can resolve this problem? thanks joan very much – Xúc Cảm Oct 19 '16 at 0:46
  • 1
    thanks @kwasmich. Exactly, that is everything I want to ask. – Xúc Cảm Oct 19 '16 at 0:48
  • 1
    Have you considered a PCA9685 PWM chip (or module). Commonly sold as servo pulse modules. That is I2C based and will provide 16 PWM outputs. – joan Oct 19 '16 at 8:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.