MD25 Mode Changes

Motor, Servo, Speech etc.

Moderator: chris

MD25 Mode Changes

Postby Andy101 » Thu Jan 19, 2012 11:19 pm

Hello,

I'm having major problems trying to persuade my Arduino Mega 1280 to change the mode on my MD25. As long as I accept the default mode 0, I can control the two motors quite happily which suggests the I2C interface and associated software is working correctly. Unfortunately I want to run the system in mode 2 and, despite trying to change the mode to mode 2 (by writing 2 to register 15 of the MD25), the MD25 insists on remaining in mode 0. I believe the problem is trying to write to the register as reading such data as battery voltage, revision number, etc., from the other registers seems to work.

Has anyone managed to change the mode, preferably using the Arduino board please? If so, how did you do it?

I've searched the various Arduino forums but only found very contradictory suggestions and various examples. None of the ones I've tested have worked for me. I'll admit quite a few messages suggest there are bugs in the Arduino software.

I've tried contacting support here to ask if there is a bug in the MD25 software but, so far, without a reply. I doubt if there is a problem with the MD25 software but I wanted to check.

I've tried versions 0.2.2, 0.2.3 and the new 1.0 of the Arduino software on both a linux based system as well as an XP one; both show the same problem.

Examples of my programme can be supplied if necessary.

Any help would be greatly appreciated.

Thanks in anticipation

Andy.
Andy101
 
Posts: 4
Joined: Thu Jan 19, 2012 11:06 pm

Re: MD25 Mode Changes

Postby Gerry » Mon Jan 23, 2012 3:21 pm

Hi Andy,
It works for us, tested using this initialisation:

Code: Select all
#define md25Address 0x58                                // Address of the MD25
#define setMode 15
#define mode2 2

 Wire.beginTransmission(md25Address);                    // Set Mode 2 on MD25
 Wire.send(setMode);
 Wire.send(mode2);                                           
 Wire.endTransmission();
User avatar
Gerry
Site Admin
 
Posts: 245
Joined: Wed Nov 08, 2006 12:28 pm

Re: MD25 Mode Changes

Postby Andy101 » Mon Jan 23, 2012 4:29 pm

Hello Gerry,

Thanks for your reply.

Since posting the message and having it moderated, I've solved the problem. posting.php?mode=reply&f=4&t=584#

For some unknown reason, leaving the programming cable in place and using it to pass data to the serial monitor on my linux based PC results in problems with the Arduino card trying to drive the I2C interface. Not sure why this should be so and will have to investigate further one day.

Again, many thanks for your reply.

Regards

Andy
Andy101
 
Posts: 4
Joined: Thu Jan 19, 2012 11:06 pm


Return to Drivers

Who is online

Users browsing this forum: No registered users and 1 guest

cron