Go to Post We do not pursue awards, we pursue greatness and the awards follow. - Sunshine [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

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 18-01-2007, 18:42
hanan hanan is offline
Registered User
no team
 
Join Date: Jan 2007
Location: Israel
Posts: 14
hanan has a spectacular aura abouthanan has a spectacular aura about
Question joystick sensitivity

Hi,
I am using easyC pro and I am confused.
Downloaded the 2007demo code.
1) Is there a way to read the outputs of the joystick according to a specific axis? (just like in mplab, where you have p1_y for joystick1, from Kevin's code). I want to be able to control only one axis at a time in order to drive like a tank. For now, I am using this "arcade2" or "arcade4" block, and its just like a black box for me. I want to be able to check for each bottom in the joystick, if it was pushed - to do something (like in mplab, but in easyC, without any block "OI to relay" or something like that)
2) Joystick is too sensitive. I want to be able to write:
setPWM(my_motor_pwm, joystick value corresponding to speed);
and not to use this arcade2 block that automaticly sends pwm from both axis, all time. don't want that.
I want the freedom to choose.
Can you help me guys?
  #2   Spotlight this post!  
Unread 18-01-2007, 18:59
Blair Frank's Avatar
Blair Frank Blair Frank is offline
Writer and Alumnus
FRC #0852 (Athenian Robotics Collective)
Team Role: Alumni
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Walla Walla, WA
Posts: 49
Blair Frank is a jewel in the roughBlair Frank is a jewel in the roughBlair Frank is a jewel in the roughBlair Frank is a jewel in the rough
Re: joystick sensitivity

In EasyC Pro, you can use another RC block labled Tank. If you are driving two motors, use Tank-2, or if you are driving four motors, use Tank-4. As far as the speed, I have no clue as to how you could do that.
__________________
Proud alumnus of Team 852, the Athenian Robotics Collective.

Pneumatics in a nutshell: Put together an elaborate series of pipes, canisters, cylinders, valves and hoses; then fill that system with highly pressurized air, and hope that it doesn't blow up in your face.
  #3   Spotlight this post!  
Unread 18-01-2007, 19:12
hanan hanan is offline
Registered User
no team
 
Join Date: Jan 2007
Location: Israel
Posts: 14
hanan has a spectacular aura abouthanan has a spectacular aura about
Re: joystick sensitivity

Hello Blari,
inside the functions of 2007kickoff, I didn't see any "tank" function. (I did see it, under one of my tutorial libraries, regarding Vex, I think). I need to import it somehow?

But, I'll back for the same probelm - having a nice box, called "tank", but I can't really control it.

I want one joystick for driving like a tank. if I detect joystic's num 1, x axis had been changed, so change ONLY motor num1 accordingly (now, "arcade2" move them both). Same is for y axis - If I detect something on y axis - only the motor corresponds for driving in "y axis" will operate, according to the value that the joystick was steared.
so, if I move joystick forward, with a little deviation to the left/right I'll be able to figure out that on x axis, its probably the operater mistake, and move only on y axis (beacuse I want to move like a tank, and this is howt I'll tell my operators to play).

Thanks.
  #4   Spotlight this post!  
Unread 18-01-2007, 19:35
dcbrown dcbrown is offline
Registered User
AKA: Bud
no team
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Hollis,NH
Posts: 236
dcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud of
Re: joystick sensitivity

Not to be rude, but read all the documentation. For a hint on what documentation to read, see the attached picture.

EasyC : Help -> search -> joystick. This gets you info on joystick inputs.

e.g.
joy1_y = GetOIAInput( 1, 2 )


EasyC : Help -> search -> motors. This gets you info on outputs.

e.g.
SetPWM( 1, joy1_y );
Attached Thumbnails
Click image for larger version

Name:	analog.JPG
Views:	83
Size:	26.3 KB
ID:	4901  
  #5   Spotlight this post!  
Unread 19-01-2007, 05:36
hanan hanan is offline
Registered User
no team
 
Join Date: Jan 2007
Location: Israel
Posts: 14
hanan has a spectacular aura abouthanan has a spectacular aura about
Re: joystick sensitivity

rude? not at all.
Its just there is so much information, sometimes you can get lost...
so thank for that.
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
Accelerometer Sensitivity zachriggle Programming 0 27-01-2006 23:16
White Paper Discuss: Joystick Sensitivity Demystified - Version 2 marccenter Extra Discussion 0 28-02-2005 16:54
joystick sensitivity Team 668 Programming 11 16-02-2005 18:45
Help with Joystick Axes and Sensitivity bglass Programming 6 06-02-2005 14:01
Adjusting Sensitivity/Scale of Controls archimedes Control System 6 14-01-2005 10:30


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

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