Go to Post Unless your HS students have earned BSEE and BSME degreees already, how can they lead or run an engineering team? - KenWittlief [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 01-02-2008, 18:58
iwin2000 iwin2000 is offline
Registered User
no team
 
Join Date: Dec 2007
Rookie Year: 2008
Location: CT
Posts: 23
iwin2000 has a spectacular aura aboutiwin2000 has a spectacular aura about
Need Help with Sensitivity of Joysticks

I'm trying to decrease the maximum range of the joystick on the x-axis using EasyC because the robot turns too fast on the x-axis. I tried using arcade mode at first, but I don't see a way of limiting the joystick range or the PWM output via the Arcade function.

What I tried to do was limit the PWM input. As a test, instead of being 0 (Minimum output), it is now 77, and it is 177 as a maximum. I used the following code and it doesn't seem to work. Does anyone know how I can do this?

Code:
unsigned char Port1XAxis = 127; 
while ( 1 ) 
{ 
OIToPWM ( Port1XAxis , 1 , 1 , 0 ) ; 

if ( Port1XAxis <= 77 ) 
{ 
Port1XAxis = 77 ; 
//SetPWM ( 2 , 177 ) ; 
//SetPWM ( 1 , 177 ) ; 
} 

else if ( Port1XAxis >= 177 ) 
{ 
Port1XAxis = 177 ; 
//SetPWM ( 2 , 77 ) ; 
//SetPWM ( 1 , 77 ) ; 
} 
Arcade2 ( 1 , 2 , 0 , 0 , 2 , 1 , 1 , 1 ) ;
I know this code has some errors, but can someone help me figure out how to do something like this?

Thanks a lot.
 


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
Sensitivity Wheels - help please naor52 Programming 6 20-01-2006 09:13
Help with Joystick Axes and Sensitivity bglass Programming 6 06-02-2005 14:01
hey need some help with writing a code please help me here magical hands Programming 9 01-01-2004 21:46
Need help with C++ Tton Programming 7 04-11-2003 19:15
Could use some help with joysticks . . . archiver 2001 5 23-06-2002 23:36


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

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