Go to Post Try to remember, FIRST is like life, it is about the journey not the destination. - rees2001 [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 11-02-2006, 13:27
Unholy Unholy is offline
electrical / makeshift programmer
AKA: Daniel
FRC #1402
Team Role: Programmer
 
Join Date: Feb 2006
Rookie Year: 2002
Location: Orlando, FL
Posts: 21
Unholy is an unknown quantity at this point
Send a message via AIM to Unholy
issues limiting a joystick input

I'm trying to limit the speed in a motor through programming in in such a way that when the joystick is fully deflected, i will only get a response of, let's say, 93 instead of 0, and 150 instead of 255. The way the joystick is set to work is that it won't be engaged unless the trigger is closed. Initially, as soon as I clicked the joystick trigger, my value would change automatically to 0 from 127 using a command looking like this:


if (p3_sw_top == 1 )
{
pwm03 = (((p3_x) *2) / 10)
}

Initially I thought I had issues with the trim, but I checked the trim using pwm03 = p3_x;, set it to neutral, went back to the line above, and as soon as I clicked again, my value was 0 again.
I'd appreciate any help I can help, and sorry for this noobish question
-Danny
 


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
2006 CMUcam2 Code Kevin Watson Programming 81 10-02-2007 20:17
Free programming help Cuog Programming 24 24-01-2006 16:43
Change joystick to pwm mapping Joe Lewis Programming 3 30-03-2005 19:27
Changing 1 joystick code to 2 (rookie team) Brawler006 Programming 5 20-02-2004 17:00
joystick problem archiver 2000 12 23-06-2002 23:08


All times are GMT -5. The time now is 20:59.

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