I am using a RaspberryPi400 to control 3 steppers motors (NEMA11, NEMA17, NEMA23) via the TIC36V4 driver.
I want to use I2C to send and recieve data between the RPi and the drivers. The user manual (Pololu - 10. I²C command encoding) explains how I2C works and gives some examples using SMBus in python.
However, another slave device that I am using is not compatible with SMBus library and requires to use PIGPIO library.
I was then wondering if it is also possible to use PIGPIO library with TIC36V4 driver. If so, is there any documentation on how to use pigpio library with the driver, like a basic example of a working I2C communication using pigpio ?
Thanks in advance
We do not have any example code showing how to use the Tic with pigpio. I looked briefly at the source code of pigpio and it looks like it is just opening a file handle to a standard Linux I2C device (e.g.
/dev/i2c-1) and using the
I2C_RDWR ioctl to talk to access the bus. That’s the same thing we are doing with the Python smbus2 library. You should be able to talk to one device using pigpio and another device using smbus2 at the same time, even if they are on the same bus.
If you want to reduce the number of libraries you rely on, it should be possible to port the code for the other device to use smbus2 (which is what I would do) or port the Tic example code to use pigpio.