|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
autonomous mode
hi im the programmer for team 867, i was wondering is there any default code for autonomous. and i have another question, how can we activate autonomous mode for testing.
|
|
#2
|
||||
|
||||
|
Re: autonomous mode
This thread may help you out
http://www.chiefdelphi.com/forums/sh...threadid=53137 |
|
#3
|
||||
|
||||
|
Re: autonomous mode
ok kool i got it. this has nothing to do with this but i want to add a dead zone on the joystick. so like the robot wont move the split second you touch the joystick, how can i do this.
|
|
#4
|
||||
|
||||
|
Re: autonomous mode
Quote:
You could try something simple like this, to basically ignore the values near the centre of travel: Code:
if ((joy >= 120) && (joy <= 140)) joy = 127; Code:
speed = joy - 127; newspeed = ((speed * speed) / 127) * sign(speed); Good luck, Mike |
|
#5
|
||||
|
||||
|
Re: autonomous mode
i have 2 questions
1. where do i splice in the code you gave me i was looking through the code i cant see where to put it. 2. do i connect the user interface to my computer for running the labview program. |
|
#6
|
||||
|
||||
|
Re: autonomous mode
Quote:
Code:
#define JOYSTICK_DEADZONE 5
...
if((joy >= (127 - JOYSTICK_DEADZONE)) && (joy <= (127 + JOYSTICK_DEADZONE)))
{
joy = 127;
}
Code:
#define JOYSTICK_DEADZONE 5 #define DEADZONE(input, dz) (if(((input) >= (127 - (dz))) && ((input) <= (127 + (dz)))) (input) = 127;) ... DEADZONE(joy1, JOYSTICK_DEADZONE) DEADZONE(joy2, JOYSTICK_DEADZONE) Quote:
Quote:
|
|
#7
|
||||
|
||||
|
Re: autonomous mode
Quote:
Labview is a graphical development environment that runs on your PC. A copy of Student Labview was included in the KOP this year. I am attaching a screen shot of the Labview program running the Joystick application - you will get the idea that it is only useful to ILLUSTRATE how joystick values might be processed. The simulated joystick input is the horizontal slider at upper left. The three scales below show linear (direct), exponential, and logarithmic conversions. Last edited by mluckham : 31-01-2007 at 16:05. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Autonomous Mode | EricWilliams | Programming | 8 | 10-01-2007 10:58 |
| Autonomous Mode | Yellow Eyes | Programming | 2 | 18-02-2004 21:16 |
| autonomous mode | Stephanie | Programming | 2 | 25-01-2003 19:57 |
| Autonomous Mode | David Bryan | Programming | 1 | 21-01-2003 21:15 |
| autonomous mode? | bigwalt | Technical Discussion | 1 | 21-01-2003 01:14 |