BrickPi3 C drivers for i2c device (TETRIX Motor Controller2); opt. workarounds;

Quote by Matt:

If you must use Tetrix motors, you should look for an alternative controller for them. Looking at the Arduino drivers for the TETRIX MAX DC Motor Expansion Controller2, it looks like it’s an I2C device, which means you could probably control it from a BrickPi3 (connected to a sensor port, or even to the Grove I2C port).

Can Dexter provide a C driver for the TETRIX MAX DC Motor Expansion Controller2? Unfortunately I have not the skills to write C++ code by my own and I do not understand Arduino C++ code and how to port it to BrickPi3 code. I can only program in plain ANSI C, but even then writing driver code for i2c or anything also ever has been far beyond my skills (that was already so in the times of NXC and even later for Arduino Wiring).

Hey @HaWe! We keep this idea on our list, but right now everyone on our team is busy with other projects. Unfortunately, at the moment, we are not able to develop libraries for the Tetrix Max DC Motor Expansion Controller.

You may want to reach out to Tetrix and ask them to develop a C Driver for the BrickPi3. We would be happy to help them with that.

unfortunately I have no contact to Pitsco, I once bought my Tetrix parts from a European vendor.
OTOH, there are a couple of points to mention:
1st, as I just observed, there is an additional motor driver interface for the Tetrix motors, once made for the NXT sensor ports, and to be controlled e.g. also by RobotC (I don’t recall quite surely if also for NXC, too): that would be much more suitable to be plugged to Brickpi3 as well.
2nd, currently Brickpi3 just supports just a small subset of the devices (incl. from 3rd party companies) which can be plugged to the NXT or to the EV3, so it’s actually not as versatile as the original Lego programmable bricks - to be more versatile than Lego with respect to IO devices will be considered to be a quite precious reason to buy the BickPi3 over the EV3, the NXT, or the expected ( R)EV4 next year.
3rd, vice versa it’s a very good selling point also for 3rd party companies to support brickpi3, additionally.

Finally both you, Dexter, and Pitsco, are “Lego 3rd party companies”, and both of you are experienced hardware and software developers, so after all I am sure that it would be far more promising if you, Dexter, contacted Pitsco directly by your own to develop hardware drivers by sort of a joint venture project, other than me as an entire layman and newbie, what would you think?

by some experiments I found out a perfectly working way making larger and stronger motors run by a 2nd power-H-bridge of L298N type logic (or even stronger) and an intermediate Z-Diode driven interface
it works fine and perfectly smoothly:


the left side inputs come from an EV3 or a BrickPi3 motor plug (white+black wires), the 3 output pins (dir1, dir2, pwm=enable) go to the new additional power H-Bridge inputs which drive the high voltage + high current motors then!
share and enjoy!