View unanswered posts | View active topics It is currently Wed Dec 19, 2018 5:23 am






Reply to topic  [ 4 posts ] 
NXTMMX-v2 with EV3 using 4.27RobotC 
Author Message
Expert

Joined: Thu Dec 01, 2011 12:07 am
Posts: 151
Post NXTMMX-v2 with EV3 using 4.27RobotC
I have an EV3 with RobotC 4.27 and need additional motors. Does the Mindsensors NXTMMX-v2 work with this setup?


Thu Jan 15, 2015 12:09 am
Profile
Site Admin
Site Admin
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3654
Location: Rotterdam, The Netherlands
Post Re: NXTMMX-v2 with EV3 using 4.27RobotC
For one, you need to use at least 4.28, which you can download here: http://www.robotc.net/blog/2014/12/23/r ... 4-28-beta/

As for the NXTMMX-2, I have not tested the driver suite's driver with that specific sensor on the EV3 yet.

= Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Thu Jan 15, 2015 1:34 am
Profile WWW
Expert

Joined: Thu Dec 01, 2011 12:07 am
Posts: 151
Post Re: NXTMMX-v2 with EV3 using 4.27RobotC
I loaded RobotC 4.28 beta. Loaded the BotBench drivers. Updated the files mindsensors-motormux.h, common.h, and common-mmux.h.
I have the motor mux in Sensor port 2 and the Motor in port 1 of the motor mux.

The code below compiles but the motor does not run when the green LED is on. It does run when the red LED is on. It does this with two different motors. Any ideas what is going on?

Code:
#pragma config(Sensor, S1,     ,               sensorEV3_Color)
#pragma config(Sensor, S2,     MSMMUX,         sensorI2CCustom)
#pragma config(Motor,  motorA,           ,             tmotorEV3_Large, openLoop)
#pragma config(Motor,  motorB,           ,             tmotorEV3_Large, openLoop)
#pragma config(Motor,  motorC,           ,             tmotorEV3_Large, openLoop)
#pragma config(Motor,  motorD,           ,             tmotorEV3_Large, openLoop)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//

#include "mindsensors-motormux.h"

task main()
{
   MSMMUXinit();  //init
        MSMotorStop(mmotor_S2_1);  //stop
        //MSMMUXsetPID(MSMMUX, 0x1B58, 0x0000, 0x927C, 0x3A98, 0x012c, 0x1D4C, 0x10, 0x80);
   MSMMotorEncoderReset(mmotor_S2_1);  //reset mux encoders
   MSMMotorEncoderReset(mmotor_S2_1);  //reset motor 1 encoder
   MSMMotor(mmotor_S2_1, 80);  //move the motor
   setLEDColor(1);  //green
   delay(3000);  //delay 3 sec
   MSMMotor(mmotor_S2_1, -80);  //move the motor
   setLEDColor(2);  //red
   delay(3000);  //delay 3 sec   
   MSMMotor(mmotor_S2_1, 0);  //move the motor
   setLEDColor(3);  //orange
   
   while(1>0)
   {
   delay(10);
   }
}


Tue Jan 20, 2015 10:04 pm
Profile
Expert

Joined: Thu Dec 01, 2011 12:07 am
Posts: 151
Post Re: NXTMMX-v2 with EV3 using 4.27RobotC
I found that a 100ms delay was needed after the MSMotorStop to allow it to work correctly. 50ms still did not allow the 1st MSMMotor command to work.

Code:
      MSMMUXinit();  //init
      MSMotorStop(mmotor_S3_2);  //stop
      delay(100);                     <------------------------------------------------- added this delay!
      MSMMotorEncoderReset(mmotor_S3_2);  //reset motor encoder
      MSMMotor(mmotor_S3_2, 80);  //move the motor
      setLEDColor(1);  //green
      delay(3000);  //delay 3 sec
      MSMMotor(mmotor_S3_2, -80);  //move the motor
      setLEDColor(2);  //red
      delay(3000);  //delay 3 sec
      MSMMotor(mmotor_S3_2, 0);  //move the motor
      setLEDColor(3);  //orange


Sat Jan 31, 2015 12:49 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.