|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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
|
||||
|
||||
|
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.
|
|
#3
|
|||
|
|||
|
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
|
|||
|
|||
|
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 ); |
|
#5
|
|||
|
|||
|
Re: joystick sensitivity
rude? not at all.
Its just there is so much information, sometimes you can get lost... so thank for that. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
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 |