Go to Post "Trying to teach a nerd to be sensitive to girls is like trying to teach a dog Jamacian, and expect it to talk back" - Hansen302 [more]
Home
Go Back   Chief Delphi > Technical > Control System
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rating: Thread Rating: 6 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 24-01-2007, 14:35
Mike Copioli's Avatar
Mike Copioli Mike Copioli is offline
You make it pretty We make it dance
no team (Retired(3539, 217))
Team Role: Engineer
 
Join Date: Jan 2006
Rookie Year: 2001
Location: Romeo
Posts: 453
Mike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond repute
Re: How the heck do you use an XBOX360 controller with the chicklet??

Quote:
Originally Posted by Choi9111 View Post
ya duh i know that...i was talking more about programming wise... thanks for making me seem dumb.
Then the answer is still yes. If the inputs are to sensitive, then you should scale them. For example, if you desire more control over the lower 1/3 of the throttle, just write a function that scales the input so the lower 1/3 of the output to the PWM is spread over a larger fraction of the joystick movement.

lets say you want more control over the output range 127-168. Scale the input by dividing the actual joystick value by a constant greater than 1 or multiply the joy value by a constant less than 1. You will need a conditional to evaluate if the joystick is <=168 in this example. If the condition is true you would apply the scaling to the input value.

#define SCALING_FACTOR .8

If (joy <= 168 && > 0)
{
unsinged char pwm;
pwm = scale(joy);
}

unsigned char scale(unsigned char joy_val)
{
new_pwm = joy_val * SCALING_FACTOR;
return new_pwm;
}

Now this does not account for the reverse values but you get the idea. This is just an example and probably wont work.
__________________
Mike Copioli
CTRE Hardware Engineer
http://www.ctr-electronics.com

Team 3539 The Byting Bull Dogs
2013 Michigan State Champions
Team 217 The Thunder Chickens
2006 World Champions
2008 World Champions
2009 Michigan State Champions

Last edited by Mike Copioli : 24-01-2007 at 21:30.
Reply With Quote
  #2   Spotlight this post!  
Unread 24-01-2007, 15:45
Choi9111's Avatar
Choi9111 Choi9111 is offline
(^_^)v I ROCK!!!!
AKA: BAKA!!!!!!!!!!!!!!!! (Tomo) >_<
FRC #0932 (Leviathan)
Team Role: Driver
 
Join Date: Jan 2007
Rookie Year: 2003
Location: Oklahoma
Posts: 80
Choi9111 is on a distinguished road
Re: How the heck do you use an XBOX360 controller with the chicklet??

Thanks! i think ill try it out!
__________________
I AM Leviathan...only not as green and slimy...and i only have 4 limbs not 8...wait technically im not leviathan at all...>_<,
Reply With Quote
Reply


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
How did you use the FP motors? Validius Motors 25 02-03-2005 01:30
How to use timer in the controller Thedarkmaster Programming 5 09-01-2005 12:48
how do you use the listen to site? Alex Cormier Chit-Chat 5 15-02-2004 21:33
Can you use PWMs (Red or Blue) with the edubot controller? Dr.Bot Robotics Education and Curriculum 3 04-12-2003 23:51
Can you use the spikes with the globe motors? Caleb Fulton Electrical 1 15-02-2003 20:13


All times are GMT -5. The time now is 05:55.

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