Go to Post WHAT!?!?!? YOU DON'T DEVOTE YOUR LIFE TO APPLE!?!?!?!? ;) :p - Joe Matt [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 11-01-2007, 17:27
Inverted Inverted is offline
Registered User
AKA: Eric P.
FRC #1228 (Robo Tribe)
Team Role: College Student
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Rahway, NJ
Posts: 25
Inverted is an unknown quantity at this point
Send a message via AIM to Inverted
Custom Joystick Setup in easyC

Last year I developed a "Halo drive" control system for the robot in MPLab, which we plan to use again this year. The only problem is, since this is my senior year, I need to train some younger members to program, which will be done in easyC. Last year I completely avoided easyC because I didn't want to take the time to learn a new program. So this year I'm kinda screwed.

So anyway, I don't have the code I made up last year on me right now, as it's on my other laptop, but I was just wondering if there's any way to set up a control scheme that's not Arcade or Tank drive. If it helps, I had the controllers set up so that the wheels moved forward/back via input from the left joystick Y-axis, and moved left/right via the right joystick X-axis.

Thanks
  #2   Spotlight this post!  
Unread 11-01-2007, 17:50
MattD's Avatar
MattD MattD is offline
Registered User
AKA: Matthew Douglas
FRC #0228 (GUS Robotics)
Team Role: Alumni
 
Join Date: Feb 2006
Rookie Year: 2005
Location: Indianapolis, IN
Posts: 185
MattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to behold
Send a message via AIM to MattD
Re: Custom Joystick Setup in easyC

Yes, you can use OIToPWM() for direct drive or use GetOIAInput() with SetPWM() and make adjustments.

Code:
void OIToPWM(port, axis, pwm, direction)

port - the joystick's port on the OI
pwm - pwm output port number
axis - 1 = x, 2 = y, 3 = wheel, 4 = aux
direction - 0 = normal, 1 = invert

unsigned char GetOIAInput(port, axis)

port - the joystick's port on the OI
axis - 1 = x, 2 = y, 3 = wheel, 4 = aux

void SetPWM(pwm, value)

pwm - pwm output port number
value - the value to set it at
__________________
GUS Robotics Team 228

2010 WPI Engineering Inspiration Award
2010 WPI Regional Champions (Thanks 230 & 20!)
2010 CT VEX Champions
2010 CT VEX Innovate Award
2009 QCC VEX Champions
2009 CT Motorola Quality Award
2007 CT J&J Sportsmanship Award
2006 CT Best Website Award
  #3   Spotlight this post!  
Unread 11-01-2007, 23:12
Kingofl337's Avatar
Kingofl337 Kingofl337 is offline
You didn't see anything....
AKA: Adam
FRC #0501 (Power Knights)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 1998
Location: Manchester, NH
Posts: 861
Kingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond repute
Send a message via Yahoo to Kingofl337
Re: Custom Joystick Setup in easyC

Check this out: http://www.chiefdelphi.com/forums/at...8&d=1165872883

It has examples of exactly what you want to do.
__________________
FIRST Team 501 PowerKnights - Mentor
FIRST Team 40 Checkmate - Mentor Alum
FIRST Team 146 Blue Lightning - Alumni
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
CMU CAM setup stephenthe1 Programming 0 17-01-2006 11:36
CMUcam setup Ryan Collings Programming 26 13-01-2006 01:00
Kickoff easyC workshop integrated into EasyC help file Dan Larochelle Programming 0 11-01-2006 06:12
EasyC v. 2.0 - New features, custom user functions, and more! artdutra04 FIRST Tech Challenge 1 02-11-2005 13:36
Favorite Joystick Setup? We're new eatthafoodtina Control System 22 29-01-2005 18:14


All times are GMT -5. The time now is 20:52.

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