Wild Thumper/Trex Controller/I2C not working

I have purchased a Wild Thumper 6WD robot with a Trex controller, to be controlled by a Raspberry Pi 2 computer via an I2C cable.

For control, I wrote a program that does one of the two things

  1. It sends a 27 character control packet with the instruction to the controller to spin wheels (make DC).
    or
  2. It sends a data request to the controller to get status.

Part 2 works great and I get a pretty sane looking status, including the value of the input voltage.

However, part 1 never worked and I could never get the robot to do anything. In addition, the error code that is returned in the status packet in step 2, was pretty non-specific.

After much struggle, I finally was able to polish up and send what I consider to be perfectly correct command packet. As a result of this packet, the controller REBOOTS. I am not sure why that was happening. I did double check and verified that the “battery voltage” parameter that I supplied, was low enough as to not cause the shutdown.

At this point I am at a loss and I want to seek advice how can I troubleshoot this problem. Any suggestions?

thanks

I have an identical setup that I was able to get working yesterday.

What O/S are you running on the Pi 2?
I have gone for Ubuntu 14.04 (Arm version)

What language are you using on the PI?
My working test code is in Python3 originally using smbus but converting to Quick2Wire

I had a very similar problem caused when using the following line:
i2c.write_i2c_block_data(i2cAddress, 0, request) – where request is the 27 Byte array

I had seen in google post elsewhere that the second parameter was ignored, hence the 0.
However the method actually sends the second parameter as the first byte of the packet which means you need to send the start byte and then remove it from the request.

A second issue is using smbus to read multiple bytes. It appears that after a multi_byte read it will send a write request (I think some kind of acknowledgement). This causes the TReX to reset and stop.
This is the reason I had to switch my read over to Quick2Wire to allow me to intersperse read and write operations.

I am currently working on packaging up my working code and will push it to git hub.

Please post your code here and I may be able to spot your issue.

Hi,

This is an FYI and out of the topic but just to be careful with Wild Thumper 6WD and the TRex controller : chassis-screws-t-rex-motor-controller-with-wild-thumper-6wd-t11376