Go to Post Let's sheathe the pitchforks and douse the torches for another two months, shall we? - Taylor [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #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
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
EasyC master code issues Joe G. Programming 2 14-12-2007 11:28
Code Flashing Issues bluenp Programming 4 07-11-2007 23:43
need help with our default code coolguybigt Programming 14 19-02-2007 10:17
Issues with encoder code jgannon Programming 7 26-03-2006 15:12
Issues with MPLAB 7.30 gnirts Programming 4 25-01-2006 22:57


All times are GMT -5. The time now is 18:35.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi