Go to Post If it were easy it wouldn't be worth triple the points, right? - SenorZ [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 04-12-2004, 21:21
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
Please Help: Programming the Robovation Kit

Hi.
I'm starting a rookie team (#1529) in Indianapolis, and we've received the little robot kit. The electronics / mechanical doesn't "scare" me, but the programming is pretty confusing to me at this point. I've downloaded files from www.innovationfirst.com/info, loaded the CD stuff and installed the software ... If anyone could give me very very simplified cookbook step by step instructions as to how to connect and specifically what to type to make the robot say go forward / backward / left / right, that would be a tremendous help. Thanking you in advance, The Murf
  #2   Spotlight this post!  
Unread 04-12-2004, 21:26
Jaine Perotti Jaine Perotti is offline
...misses her old team.
AKA: BurningQuestion
FRC #0716 (The Who'sCTEKS)
Team Role: Alumni
 
Join Date: May 2004
Rookie Year: 2003
Location: Melbourne, FL
Posts: 979
Jaine Perotti has a reputation beyond reputeJaine Perotti has a reputation beyond reputeJaine Perotti has a reputation beyond reputeJaine Perotti has a reputation beyond reputeJaine Perotti has a reputation beyond reputeJaine Perotti has a reputation beyond reputeJaine Perotti has a reputation beyond reputeJaine Perotti has a reputation beyond reputeJaine Perotti has a reputation beyond reputeJaine Perotti has a reputation beyond reputeJaine Perotti has a reputation beyond repute
Send a message via AIM to Jaine Perotti Send a message via MSN to Jaine Perotti Send a message via Yahoo to Jaine Perotti
Re: Please Help: Programming the Robovation Kit

Read the white paper Programming Quickstart. It will have lots of good basic information.Do some of the tutorials mentioned. They will probably help you.
__________________
Florida Institute of Technology
Ocean Engineering, '12
  #3   Spotlight this post!  
Unread 04-12-2004, 21:31
Unsung FIRST Hero
Mike Betts Mike Betts is offline
Electrical Engineer
no team
Team Role: Engineer
 
Join Date: Dec 2001
Rookie Year: 1995
Location: Homosassa, FL
Posts: 1,442
Mike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond repute
Re: Please Help: Programming the Robovation Kit

Specifially, what to type... You should be able to control your robot form an RC controller with the default code. Please be more specific... Do you need help in loading the default code?
__________________
Mike Betts

Alumnus, Team 3518, Panthrobots, 2011
Alumnus, Team 177, Bobcat Robotics, 1995 - 2010
LRI, Connecticut Regional, 2007-2010
LRI, WPI Regional, 2009 - 2010
RI, South Florida Regional, 2012 - 2013

As easy as 355/113...
  #4   Spotlight this post!  
Unread 04-12-2004, 23:29
Mike's Avatar
Mike Mike is offline
has common ground with Matt Krass
AKA: Mike Sorrenti
FRC #0237 (Sie-H2O-Bots (See-Hoe-Bots) [T.R.I.B.E.])
Team Role: Programmer
 
Join Date: Dec 2004
Rookie Year: 2004
Location: Watertown, CT
Posts: 1,003
Mike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond repute
Re: Please Help: Programming the Robovation Kit

Quote:
Originally Posted by wmurphy
to make the robot say go forward / backward / left / right, that would be a tremendous help.
Hey, I just started myself the other day.
If you look on your processor, theres like 10 PWM Outputs, thats where you plug your motors into.
To drive your bot, it'd be something like this (Default Routine function in user_routines.c)
Code:
void Default_Routine(void)
{
  
   pwm01 = 255; // Motor on PWM Output 1 go forward full thrust
   pwm02 = 0; // Motor on PWM Output 2 go reverse full thrust
   pwm03 = 127 // Motor on Pwm Output 3 neutral

}
To make your coding a little easier to read, in user_routines.h you can use #define like so
Code:
/* Used in limit switch routines in user_routines.c */
#define OPEN        1     /* Limit switch is open (input is floating high). */
#define CLOSED      0     /* Limit switch is closed (input connected to ground). */

// I edited from here
#define LeftMotor	pwm01
#define RightMotor	pwm02
#define FrontMotor	pwm03
// to here
and then your code in user_routines.c would be
Code:
void Default_Routine(void)
{
  
   RightMotor = 255; // Motor on PWM Output 1 go forward full thrust
   LeftMotor = 0; // Motor on PWM Output 2 go reverse full thrust
   FrontMotor = 127 // Motor on Pwm Output 3 neutral

}

Hopefully I helped,
__________________
http://www.mikesorrenti.com/
  #5   Spotlight this post!  
Unread 06-12-2004, 20:05
krhs_programmer's Avatar
krhs_programmer krhs_programmer is offline
Programmer, Engineer, exDriver
#1247 (R.O.K.S.)
Team Role: Programmer
 
Join Date: Dec 2004
Rookie Year: 2003
Location: Sutton, NH
Posts: 23
krhs_programmer is an unknown quantity at this point
Question Re: Please Help: Programming the Robovation Kit

hey i have a question. i am playing with the little bot in preparation for this up coming regional (if we get money ) and i want to know how to make the bot do things using time, like run this motor for x amount of time then switch and do this. could you help me out because our programmers who knew what they were doing left last year and me and the other programmer are doing this for the first time and the only backgroung i have w/programming is from my sam's teach yourself C. i tried a few things but i had no luck. also how could i make an r\c controller to plug into the little box to control it remotely? any help w/this would be appreciated greatly.
  #6   Spotlight this post!  
Unread 06-12-2004, 21:05
Bharat Nain's Avatar
Bharat Nain Bharat Nain is offline
Registered User
no team
Team Role: Alumni
 
Join Date: Jan 2004
Rookie Year: 2003
Location: New York
Posts: 2,000
Bharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond repute
Send a message via AIM to Bharat Nain Send a message via MSN to Bharat Nain
Re: Please Help: Programming the Robovation Kit

Looks like you want to set a counter

Declare a variable counter:
int counter;

if (counter<100)
{
pwm01=254;
pwm02=254;
counter++;
}
if (counter<200)
{
pwm01=180;
pwm02=180;
counter++
}

//EDIT: had wrong code earlier on, this one should work //

and continue on..

Another way it to use Timers. I would suggets looking at all the help documents included with the compiler and at innovationfirst.com . If you study those and test, you will get where you have to, it has almost anything you need. Yet, if you need help feel free to post

Regarding your second question, are you using a full size controller of robovation?
__________________
-= Bharat Nain =-

Whatever you do, you need courage. Whatever course you decide upon, there is always someone to tell you that you are wrong. There are always difficulties arising that tempt you to believe your critics are right. To map out a course of action and follow it to an end requires some of the same courage that a soldier needs. Peace has its victories, but it takes brave men and women to win them. - Ralph Waldo Emerson

Last edited by Bharat Nain : 06-12-2004 at 22:02.
  #7   Spotlight this post!  
Unread 06-12-2004, 21:57
Mike's Avatar
Mike Mike is offline
has common ground with Matt Krass
AKA: Mike Sorrenti
FRC #0237 (Sie-H2O-Bots (See-Hoe-Bots) [T.R.I.B.E.])
Team Role: Programmer
 
Join Date: Dec 2004
Rookie Year: 2004
Location: Watertown, CT
Posts: 1,003
Mike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond repute
Re: Please Help: Programming the Robovation Kit

Quote:
Originally Posted by krhs_programmer
hey i have a question. i am playing with the little bot in preparation for this up coming regional (if we get money ) and i want to know how to make the bot do things using time, like run this motor for x amount of time then switch and do this. could you help me out because our programmers who knew what they were doing left last year and me and the other programmer are doing this for the first time and the only backgroung i have w/programming is from my sam's teach yourself C. i tried a few things but i had no luck. also how could i make an r\c controller to plug into the little box to control it remotely? any help w/this would be appreciated greatly.
Make a counter, declare a static variable
static unsigned int intCycles = 0;
static unsigned int intSeconds = 0;

in Process_Data_From_Master_uP:
Code:
cycleCounter	=	cycleCounter + 1;
intSeconds	=	cycleCounter / 59;
Process_Data_From_Master_uP in user_routines.c is run every 17ms, so thats roughly 59 times a second. Then when you want to run something after x seconds you'd do
Code:
if(intSeconds > 5) // just an example
{
// do your code
}
__________________
http://www.mikesorrenti.com/
  #8   Spotlight this post!  
Unread 06-12-2004, 23:19
Unsung FIRST Hero
Mike Betts Mike Betts is offline
Electrical Engineer
no team
Team Role: Engineer
 
Join Date: Dec 2001
Rookie Year: 1995
Location: Homosassa, FL
Posts: 1,442
Mike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond repute
Re: Please Help: Programming the Robovation Kit

The above suggestions will work but are not totally deterministic. If you add code (particularly debug printf statements) the timing can be affected.

I implemented the interrupt timer outlined in Timers_White_Paper and it works like a champ.
__________________
Mike Betts

Alumnus, Team 3518, Panthrobots, 2011
Alumnus, Team 177, Bobcat Robotics, 1995 - 2010
LRI, Connecticut Regional, 2007-2010
LRI, WPI Regional, 2009 - 2010
RI, South Florida Regional, 2012 - 2013

As easy as 355/113...
  #9   Spotlight this post!  
Unread 07-12-2004, 06:40
krhs_programmer's Avatar
krhs_programmer krhs_programmer is offline
Programmer, Engineer, exDriver
#1247 (R.O.K.S.)
Team Role: Programmer
 
Join Date: Dec 2004
Rookie Year: 2003
Location: Sutton, NH
Posts: 23
krhs_programmer is an unknown quantity at this point
Re: Please Help: Programming the Robovation Kit

thank you to all of you, i will try all of your suggestions and see which one works best. I would look for that documentation but i think we might have lost it last year but i'll check. Abyways this might help us with autonomous mode this year because last year we got it to follow the line (which was really hard and pretty good i think for a rookie team) and it didn't quite work. And about my second question i was wondering if there were any what kind of r/c controller i could use on the little box to make it remote controled . Like would i have to customly wire like an r/c car control unit into it or use like the big controller from the big kit?
  #10   Spotlight this post!  
Unread 07-12-2004, 09:55
Unsung FIRST Hero
Mike Betts Mike Betts is offline
Electrical Engineer
no team
Team Role: Engineer
 
Join Date: Dec 2001
Rookie Year: 1995
Location: Homosassa, FL
Posts: 1,442
Mike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond repute
Re: Please Help: Programming the Robovation Kit

Quote:
Originally Posted by krhs_programmer
thank you to all of you, i will try all of your suggestions and see which one works best. I would look for that documentation but i think we might have lost it last year but i'll check. Abyways this might help us with autonomous mode this year because last year we got it to follow the line (which was really hard and pretty good i think for a rookie team) and it didn't quite work. And about my second question i was wondering if there were any what kind of r/c controller i could use on the little box to make it remote controled . Like would i have to customly wire like an r/c car control unit into it or use like the big controller from the big kit?
Just like an RC car...
__________________
Mike Betts

Alumnus, Team 3518, Panthrobots, 2011
Alumnus, Team 177, Bobcat Robotics, 1995 - 2010
LRI, Connecticut Regional, 2007-2010
LRI, WPI Regional, 2009 - 2010
RI, South Florida Regional, 2012 - 2013

As easy as 355/113...
  #11   Spotlight this post!  
Unread 07-12-2004, 11:46
krhs_programmer's Avatar
krhs_programmer krhs_programmer is offline
Programmer, Engineer, exDriver
#1247 (R.O.K.S.)
Team Role: Programmer
 
Join Date: Dec 2004
Rookie Year: 2003
Location: Sutton, NH
Posts: 23
krhs_programmer is an unknown quantity at this point
Re: Please Help: Programming the Robovation Kit

so what just wire the r/c outputs from the car to the r/c pwm in?
  #12   Spotlight this post!  
Unread 07-12-2004, 12:19
Unsung FIRST Hero
Mike Betts Mike Betts is offline
Electrical Engineer
no team
Team Role: Engineer
 
Join Date: Dec 2001
Rookie Year: 1995
Location: Homosassa, FL
Posts: 1,442
Mike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond repute
Re: Please Help: Programming the Robovation Kit

Quote:
Originally Posted by krhs_programmer
so what just wire the r/c outputs from the car to the r/c pwm in?
Connect as per the diagram on page 6 of this: EDU-RC-2004_Ref_Guide
__________________
Mike Betts

Alumnus, Team 3518, Panthrobots, 2011
Alumnus, Team 177, Bobcat Robotics, 1995 - 2010
LRI, Connecticut Regional, 2007-2010
LRI, WPI Regional, 2009 - 2010
RI, South Florida Regional, 2012 - 2013

As easy as 355/113...
  #13   Spotlight this post!  
Unread 07-12-2004, 16:03
Mike's Avatar
Mike Mike is offline
has common ground with Matt Krass
AKA: Mike Sorrenti
FRC #0237 (Sie-H2O-Bots (See-Hoe-Bots) [T.R.I.B.E.])
Team Role: Programmer
 
Join Date: Dec 2004
Rookie Year: 2004
Location: Watertown, CT
Posts: 1,003
Mike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond repute
Re: Please Help: Programming the Robovation Kit

Quote:
Originally Posted by Mike Betts
The above suggestions will work but are not totally deterministic. If you add code (particularly debug printf statements) the timing can be affected.

I implemented the interrupt timer outlined in Timers_White_Paper and it works like a champ.
Didn't know that, as I said I just started myself 3 days ago =/
__________________
http://www.mikesorrenti.com/
  #14   Spotlight this post!  
Unread 08-12-2004, 12:39
krhs_programmer's Avatar
krhs_programmer krhs_programmer is offline
Programmer, Engineer, exDriver
#1247 (R.O.K.S.)
Team Role: Programmer
 
Join Date: Dec 2004
Rookie Year: 2003
Location: Sutton, NH
Posts: 23
krhs_programmer is an unknown quantity at this point
Re: Please Help: Programming the Robovation Kit

wel i would do what that guide said but we don't have $150 - $200 for a hobby r/c controller, as it is we don't even have money to register yet. but that other guide for timers worked with a few mods. thanks
  #15   Spotlight this post!  
Unread 08-12-2004, 12:57
seanwitte seanwitte is offline
Registered User
None #0116
Team Role: Engineer
 
Join Date: Nov 2002
Location: Herndon, VA
Posts: 378
seanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant future
Send a message via AIM to seanwitte
Re: Please Help: Programming the Robovation Kit

I haven't had a chance to put together formal documentation, but there is a Windows applications and C code library that you can use to control the mini-RC from your PC. You can download a sample project and the windows program from http://members.cox.net/seanwitte. The project is for the newest version of MPLAB so you might need to create a new workspace and manually add the .c, .h, .lkr, and .lib files to it.

Sample screen shots are in this document.

The project is set up as a single-stick drive using PWM outputs 1 and 2. Joystick 1 in the PC interface is used as the drive input. If you download the hex file and connect to the RC from PCInterface you will need to check the Enable checkbox before it will run.

If you have an Analog Devices ADXRS150EB gyro connected to input 1 the sample program will integrate the signal and send the value back as analog feedback channel 1. In the program the value will be robot.heading, in the robot struct defined in robot.h. If you click the "Show Workspace" button you'll see a model of the robot rotating in realtime as you move the gyro.

Feel free to send a PM if you need help.
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
Programming - Getting Started Mark McLeod Programming 80 16-04-2008 23:37
Robovation Robot kit cmmarkes Robotics Education and Curriculum 4 24-01-2005 17:24
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 12:42.

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