Go to Post Which puts us precisely where we were six months ago, but slightly more entertained. - cadandcookies [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

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 07-02-2006, 12:52
Chris_Elston's Avatar
Chris_Elston Chris_Elston is online now
Controls Engineer
AKA: chakorules
FRC #1501 (Team THRUST)
Team Role: Engineer
 
Join Date: Feb 2004
Rookie Year: 2001
Location: Huntington, Indiana
Posts: 750
Chris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond repute
Drive() Not a Standard Toolset in EasyC?

I was reading the WPI Documentation, bty...nice piece of work...
http://users.wpi.edu/~bamiller/WPILib/WPILib.pdf

anyway, I noticed that WPI has some functions that are interesting, like Drive();

Drive looks like it supports some deadband handling unlike SetPWM built into EasyC toolset. Also the changelog of WPI indicates it might help with some PID controls, which we are attempting in EasyC with encoders...

My question is, I don't see Drive() in the standard tool set, however I think we could call this function by doing a User Code Toolset, then typing Drive()

Haven't tried it yet.

I also wondered and saw in your Tutorials like Tutorial 7, that Drive () and Motor () function are listed. Do we just need to recode this in our project as you've provided in Tutorial 7 or is that already part of the WPI library and we can call the function by doing a User Code and typing Drive () to call the function?

Other functions not found in the EasyC toolset include:
Drive()
Motor()
Motors()

Would you happen to have a glossary of function in the WPI library? We don't want to miss anything that can be useful.

Thanks!
__________________
Team T.H.R.U.S.T. 1501
Download all of our past robot's source code here:Repository

Favorite CD quote:
"That can't be their 'bot. not nearly enough (if any) rivets to be a 1501 machine." ~RogerR: Team #1369

Last edited by Chris_Elston : 07-02-2006 at 12:56.
  #2   Spotlight this post!  
Unread 07-02-2006, 19:06
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 590
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: Drive() Not a Standard Toolset in EasyC?

Quote:
Originally Posted by chakorules
I was reading the WPI Documentation, bty...nice piece of work...
http://users.wpi.edu/~bamiller/WPILib/WPILib.pdf

anyway, I noticed that WPI has some functions that are interesting, like Drive();

Drive looks like it supports some deadband handling unlike SetPWM built into EasyC toolset. Also the changelog of WPI indicates it might help with some PID controls, which we are attempting in EasyC with encoders...

My question is, I don't see Drive() in the standard tool set, however I think we could call this function by doing a User Code Toolset, then typing Drive()

Haven't tried it yet.

I also wondered and saw in your Tutorials like Tutorial 7, that Drive () and Motor () function are listed. Do we just need to recode this in our project as you've provided in Tutorial 7 or is that already part of the WPI library and we can call the function by doing a User Code and typing Drive () to call the function?

Other functions not found in the EasyC toolset include:
Drive()
Motor()
Motors()

Would you happen to have a glossary of function in the WPI library? We don't want to miss anything that can be useful.

Thanks!
It turns out that you can use all the WPILib functions from EasyC. Since EasyC includes WPILib, you only need to be able to reference the functions that you use.

To do this, use the "File inclusion" option and add the file "BuiltIns.h".

BuiltIns.h is not included with EasyC, but it is included with WPILib. So get WPILib, extract the include file and put it into your project directory, then refer to it in the File inclusion dialog.

Here is a sample program that uses the Drive functions you were referring to (from an EasyC program - the functions are all from User Code program blocks):
Code:
#include "Main.h"

void main ( void )
{
      TwoWheelDrive(1,3);
      Drive(127,0);                // drive forwards
      Wait ( 1000 ) ;
      Drive(-127,0);               // drive backwards
      Wait ( 1000 ) ;
      Drive(0, 127);                // make full left turn
      Wait ( 1000 ) ;
      Drive(0, 0);
}
You will be able to use any of the functions in BuiltIns.h with User Code blocks. All the functions are described in the WPILib documentation. There are a few new functions that are described on the web site that haven't made it into the document, but I'll try to get that done.
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
  #3   Spotlight this post!  
Unread 08-02-2006, 08:53
intelitek_Chris intelitek_Chris is offline
Registered User
no team
 
Join Date: Dec 2005
Location: Manchester
Posts: 19
intelitek_Chris will become famous soon enoughintelitek_Chris will become famous soon enough
Re: Drive() Not a Standard Toolset in EasyC?

Actually, the drive functions are so cool that they are included in easyC, though probably not how you would have expected. They have been written completely in easyC, and are available as an easyC library. You can read more about libraries in the help file.

Just go to open file, and choose library as the file type. Your directory will switch to the default library directory. Select the library called 'drive functions', and take a look at it. It will have imported a number of user functions and variables that you can use in any program you have written.

To learn more about that, take a look at 'importing functions' in the help file.
  #4   Spotlight this post!  
Unread 08-02-2006, 09:01
Chris_Elston's Avatar
Chris_Elston Chris_Elston is online now
Controls Engineer
AKA: chakorules
FRC #1501 (Team THRUST)
Team Role: Engineer
 
Join Date: Feb 2004
Rookie Year: 2001
Location: Huntington, Indiana
Posts: 750
Chris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond repute
Re: Drive() Not a Standard Toolset in EasyC?

Quote:
Originally Posted by intelitek_Chris
Actually, the drive functions are so cool that they are included in easyC, though probably not how you would have expected.
Come on now...if they are "SO COOL" how come it's not a standard toolset? You guys are trying to keep it a secret aren't you? ;-)

It does look kewl after looking at some of the WPI documentation.

We have a PID now that is a "hummer" "hunter" at "zero" velocity. It's hard to stick the setpoint at 127 in the PID without making our own deadband rules for the PID control. We are going to try it and see if the drive function can make it better for us.

Thanks guys.
__________________
Team T.H.R.U.S.T. 1501
Download all of our past robot's source code here:Repository

Favorite CD quote:
"That can't be their 'bot. not nearly enough (if any) rivets to be a 1501 machine." ~RogerR: Team #1369
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
Drive Straight C Code using Encoders without PID? Chris_Elston Programming 17 15-02-2005 23:41
Four wheel drive question haverfordfords General Forum 25 25-01-2005 23:24
2-wheel versus 4-wheel drive Ben Mitchell Technical Discussion 23 07-11-2003 00:50
Quad- 1/2 track drive system Ben Mitchell Technical Discussion 24 30-01-2002 11:55
"Motors and Drive train edition" of Fresh From the Forum Ken Leung CD Forum Support 6 29-01-2002 12:32


All times are GMT -5. The time now is 14:23.

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