View Single Post
  #1   Spotlight this post!  
Unread 13-01-2008, 21:14
Richard McClellan's Avatar
Richard McClellan Richard McClellan is offline
Engineering Mentor
FRC #0254 (Cheesy Poofs)
Team Role: Mentor
 
Join Date: May 2004
Rookie Year: 2004
Location: Palo Alto, CA
Posts: 322
Richard McClellan has much to be proud ofRichard McClellan has much to be proud ofRichard McClellan has much to be proud ofRichard McClellan has much to be proud ofRichard McClellan has much to be proud ofRichard McClellan has much to be proud ofRichard McClellan has much to be proud ofRichard McClellan has much to be proud ofRichard McClellan has much to be proud ofRichard McClellan has much to be proud of
Send a message via AIM to Richard McClellan
Issues with our code

We're moving to WPILib this year and are having a few issues getting our code working with the FRC controller. We tested it out quite a bit on the Vex robots last fall and it worked great, but we tried downloading to last year's FRC bot for the first time today and couldn't get it to work.

The code below compiles and downloads, but does nothing after that. We were trying to get basic drive working first with the Tank2 function (We have one CIM motor on each side, plugged into PWM ports 13 and 15). Then we commented out the Tank2 function to see if we could just get the motors to turn on at all with the SetPWM function, and that didn't work either. Any ideas what we're doing wrong?

We are using MPLab v8.00, the C18 Compiler v2.40, and IFILoader v1.10.

Code:
#include "BuiltIns.h"

void IO_Initialization(void) {
	SetCompetitionMode(1);
}

void Initialize(void) {
	DefineControllerIO(INPUT, INPUT, INPUT, INPUT, INPUT, INPUT, INPUT, INPUT, INPUT,
					   INPUT, INPUT, INPUT, INPUT, INPUT, INPUT, INPUT, INPUT, INPUT);
}

void Autonomous(void) {
	printf("Autonomous\r");
	while(1) {
		printf("In Autonomous\r");
		SetPWM(13, 50);
		SetPWM(15, 50);
	}
}

void OperatorControl(void) {
	printf("OperatorControl\r");
	while(1) {
		printf("In OperatorControl\r");
		SetPWM(13, 50);
		SetPWM(15, 50);
		//Tank2(1, Y_AXIS, 2, Y_AXIS, 13, 15, 0, 1);
	}
}

void main(void){
}
__________________
~ Richard McClellan ~
Former Student on 1477 | Northside Roboteers | 2004-2005
Former Lead Mentor for 2158 | ausTIN CANs | 2007-2010
Current Mentor for 254 | Cheesy Poofs | 2013

Last edited by Richard McClellan : 13-01-2008 at 21:15. Reason: typo