Go to Post Did you inform McMaster Carr that up to 3000 FRC teams would all be attempting to acquire a very specific spring ASAP all on the same weekend? - cgmv123 [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
  #6   Spotlight this post!  
Unread 26-01-2004, 10:54
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,825
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: problems assigning unsigned chars in FRC Code

Quote:
Originally Posted by LoyolaCubs
Thanks for your help. Now the printf is coming out correctly. However, the motors are not running properly. Our Drive_Forward command looks like this:

void Drive_Forward(int counter1) // Drive forward until counter reaches zero
{
while( counter > 0 )
{
counter--;
p1_y = 254;
printf("pwm01: %d\n", (int) p1_y);
p2_y = 254;
printf("pwm02: %d\n", (int) p2_y);
printf("counter1: %d\n", counter1);
}
}

We are using the default code. The only change we've made is that the autonomous_code variable is set to 1. We called Drive_Forward(100) in the user_routines_fast loop.
ditto what Jay said.
Also your code has a simple error.
You are passing in "counter1", but use "counter" (without the "1") in the routine.

[edit]
Yep, the loop prevents the PWM values from being passed to the Master processor. You're just talking to yourself.
[/edit]
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 27-01-2004 at 09:08.
 


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
FRC default code hedgehogger Programming 2 21-01-2004 18:41
Problem with FRC Default code AsimC Programming 2 11-01-2004 19:22
ADC problems with C library and new code Larry Barello Programming 1 09-01-2004 22:31


All times are GMT -5. The time now is 10:12.

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