Software I2C with Seeed Motor Driver

Hi,

i have a Cerbuino Bee and a Seeed Studio Groove Motor Driver and today i tested it.

I downloaded the code snipped from “Bec a Fuel” that can handle this motor driver but it requires a board with hardware I2C and now i know that the cerbuino only supports software I2C.
So i tested it for myself:


Cpu.Pin I2C_SDA = FEZCerbuinoBee.Pins.D3;
Cpu.Pin I2C_SCL = FEZCerbuinoBee.Pins.D4;
I2CBus = new SoftwareI2CBus(I2C_SCL, I2C_SDA);
I2C = I2CBus.CreateI2CDevice(Address);
var bytesSent = I2C.Write(new byte[] { MotorSpeedSet, 0, 100 });

But that only works [em]sometimes[/em]. :frowning:

I dont get it when it works and when not.

In the code snipped from “Bec a Fuel” he uses transaction based I2C. Is it a difference to the array that i send? Could this be the problem?

Or are there other issues with software I2C?

Thank you!
Daniel

Sources:

SeeedStudio I²C motor driver
https://www.ghielectronics.com/community/codeshare/entry/435

Seeed Motor Driver:
http://www.seeedstudio.com/wiki/Grove_-_I2C_Motor_Driver_V1.3
http://www.robotshop.com/media/files/pdf/datasheet-rob72212p.pdf

@ Daniel7 - The Cerbuino should support hardware I2C just fine on socket 2.

Hi John,

thank you for your answer.

Are the I2C pins available on the normal pins, too?

Daniel

@ Daniel7 - On the normal pins?

I mean the Arduino compatible pins.

Cause i dont know how to connect 2 wires to the super small pins from the gadgeteer socket. :slight_smile:

Daniel

@ Daniel7 - It looks like the hardware I2C pins are not exposed on the Arduino compatible ones.

To connect wires to the pins on the Gadgeteer socket, you could use the Breakout, Breakout TB10, BreadBoard X1 or the G-Plug modules in our catalog.

Hi John,

OK. Thank you for your help!

Daniel