I’m looking for an I2C DC Motor contoller with a couple of GPIO pins that can be read for limit switches.
Can any of the P2.x or P3.x pins of the Qwiic Motor Driver ROB-15451 be accessed and read for GPIO?
I’m looking for an I2C DC Motor contoller with a couple of GPIO pins that can be read for limit switches.
Can any of the P2.x or P3.x pins of the Qwiic Motor Driver ROB-15451 be accessed and read for GPIO?
Yes, but not out-of-the-box. The Qwiic Motor Driver ROB-15451 has several GPIO pins that can be accessed and read for limit switches or other digital inputs.
The PSOC4245 microcontroller on the Qwiic Motor Driver has several GPIO pins available:
P2.0 to P2.7 (8 pins)
P3.0 to P3.7 (8 pins)
These pins can be configured as digital inputs to read the state of limit switches or other digital signals
To use the GPIO pins, you’ll need to write custom firmware for the PSOC4245. The example code https://learn.sparkfun.com/tutorials/ho … the-motors demonstrates how to control the motor driver over I2C, but does not utilize the GPIO pins. You can follow the instructions in the hookup guide to load custom firmware onto the PSOC4245 using the Cypress PSoC Creator IDE. This will allow you to configure the P2.x and P3.x pins as digital inputs and read their states in your code.