View unanswered posts | View active topics It is currently Fri Sep 19, 2014 12:40 am






Reply to topic  [ 2 posts ] 
coding the Motor Multiplexer 
Author Message
Rookie

Joined: Fri Dec 24, 2010 1:16 am
Posts: 11
Post coding the Motor Multiplexer
Would this code work to program a power functions motor using RobotC and the MMX?
Code:
#pragma config(Sensor, S1,     MSMMUX,              sensorI2CCustom)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//

#include "drivers/common.h"
#include "drivers/HTMC-driver.h"
#include "drivers/MSMMUX-driver.h"

task main()
 {
  MSMMUXinit();
  MSMMotor(mmotor_S1_1, 100);
  wait1Msec(1000);
  MSMotorStop(mmotor_S1_1);
 }


Sun Jun 17, 2012 6:42 pm
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3223
Location: Rotterdam, The Netherlands
Post Re: coding the Motor Multiplexer
Yeah, it should, you might want to put a wait1Msec(50) or so after the last command to ensure it gets transmitted before the program ends.

- 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]


Mon Jun 18, 2012 2:03 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 2 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.