LabVIEW for LEGO MINDSTORMS and LabVIEW for Education

cancel
Showing results for 
Search instead for 
Did you mean: 

Driving Devantech MD25 motor driver with LV2009 I2C

Has anyone tried using the NXT I2C function in LV2009 to drive the MC25 brushed motor driver?

 

I cannot get them to talk. I did add 82k pull-up resistors to CLK and DATA lines as instructed in the NXT hardware interfacing data.

 

I have tried several registers including 0x0A (battery voltage) which seems fairly safe and well defined. 

 

I get the right number of bytes of data but it is either 0 or 255 randomly 

 

John Prentice

 

0 Kudos
Message 1 of 4
(7,209 Views)

Hi John,

 

Most of the problems I find with I2C is either incorrect pull-ups or incorrect addressing. The MD25 usually has a default address of 0xB0, is this what you are using? Also, 82k seems a little high- does the NXT documentation say its safe to use a smaller value, like 10k?

0 Kudos
Message 2 of 4
(7,184 Views)

Mark, greetings and thanks for your reply.

 

The 82k value came from the Lego document LEGO MINDSTORMS NXT - Hardware developers Kit (Ver 1.0) Page 9. It is also the value used in the LEGO Ultrasonic sensor unit.

 

I did use the address 0x80 and the LED flashes (or rather no flashes!) on the MD25 confirm that this is the address it is programmed to.

 

Substituting address 0x02 and a suitable register address in my VI will address the Ultrosonic sensor.

 

I was wondering if there might be a problem with the b7 being set in the address. I have a U8 wire but there might the trouble in the underlying I2C code. Hence the query if anyone had got the MD25 going. It and two geared motors with encoders is sold at a competetive price by lots of outlets.

 

John Prentice

0 Kudos
Message 3 of 4
(7,179 Views)
Could you try using 0x81 as an address, and also try 0x20?
0 Kudos
Message 4 of 4
(7,177 Views)