Go to Post I think I speak to everyone who ever attended nationals there when I say...say it with me..."Please stand clear of the doors. Por Favor Metengan se alijados de las puertas." - Justin [more]
Home
Go Back   Chief Delphi > Technical > Robotics Education and Curriculum
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 13-12-2004, 21:51
wmurphy wmurphy is offline
Registered User
#1529 (Cyber Cardinals)
Team Role: Mentor
 
Join Date: Dec 2004
Rookie Year: 2004
Location: Indianapolis
Posts: 14
wmurphy is an unknown quantity at this point
Don't Laugh - Remember I'm New ... Robovation Kit

Hi.
Is it possible to program the Robovation Kit such that it will run "autonomously" for a given length of time and then stop? In other words, since we don't have a RC transmitter / receiver to use right now - can we still get the thing to do what we want without it?
Thanks,
Murf
  #2   Spotlight this post!  
Unread 13-12-2004, 22:22
colt527 colt527 is offline
Registered User
AKA: Ken Colton
FRC #0527
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Long Island
Posts: 123
colt527 is a splendid one to beholdcolt527 is a splendid one to beholdcolt527 is a splendid one to beholdcolt527 is a splendid one to beholdcolt527 is a splendid one to beholdcolt527 is a splendid one to beholdcolt527 is a splendid one to behold
Send a message via AIM to colt527
Re: Don't Laugh - Remember I'm New ... Robovation Kit

Yes, this is actually quite easy, and no it was not a dumb question.

The best I can explain it would be through code:

Code:
unsigned long int timer = 0;//Global variable declared right under the includes

...Code ommited for posting purposes...

//This function gets called every 17ms, therefore you just use a global variable that increments everytime this function is called to keep track of the time that is going by.
void Process_Data_From_Master_uP(void)
{
  Getdata(&rxdata);   /* Get fresh data from the master microprocessor. */

  Default_Routine();  /* Optional.  See below. */

  /* Add your own code here. */

  if(timer <= 85)//Both pwms full forward for first 5 seconds (17 * 5= 85)
  {
    pwm07 = 255;
    pwm08 = 255;
  }
  else if(timer > 85 && timer <= 119)//For next 2 seconds turn
  {
    pwm07 = 0;
    pwm08 = 255;
  }
  else //else sit there
  {
    pwm07 = 127;
    pwm08 = 127;
  }

  timer++;//Increment the variable

  printf("PWM OUT 7 = %d, PWM OUT 8 = %d\n",(int)pwm07,(int)pwm08);  /* printf EXAMPLE */

  Putdata(&txdata);             /* DO NOT CHANGE! */
}
and there you go. You just have to edit the Process_Data_From_Master_uP function in user_routines.c. Hope I helped . Basically you just use this function to simulate autonomous, but if you need something to update faster then 17ms you need to place it in a different spot.
__________________
Mentor, Team 527 -- Plainedge Red Dragons
FIRST Volunteer
SUNY Stony Brook Computer Science 2010
kcolton@gmail.com
  #3   Spotlight this post!  
Unread 14-12-2004, 22:06
wmurphy wmurphy is offline
Registered User
#1529 (Cyber Cardinals)
Team Role: Mentor
 
Join Date: Dec 2004
Rookie Year: 2004
Location: Indianapolis
Posts: 14
wmurphy is an unknown quantity at this point
Re: Don't Laugh - Remember I'm New ... Robovation Kit

Thanks Ken! I appreciate the help.
Murf
Closed Thread


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
Robovation Robot kit cmmarkes Robotics Education and Curriculum 4 24-01-2005 17:24
Please Help: Programming the Robovation Kit wmurphy Robotics Education and Curriculum 14 08-12-2004 12:57
robovation KIT help Mirza95vx Technical Discussion 2 03-12-2004 15:08
2004 WPI EBOT Competition (using Robovation robots) ahecht Off-Season Events 3 04-11-2004 21:25


All times are GMT -5. The time now is 07:24.

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