Go to Post I will gladly be pied if that's something you guys want. I know I have people from the Clarkson FIRST dorm floor who will shell out PLENTY of cash for the chance to pie me in the face! - Libby K [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
  #8   Spotlight this post!  
Unread 25-01-2007, 22:24
Uberbots's Avatar
Uberbots Uberbots is offline
Mad Programmer
AKA: Billy Sisson
FRC #1124 (ÜberBots)
Team Role: College Student
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Avon
Posts: 739
Uberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond repute
Re: Camera for turning

i actually have a bit of code that may help you.

PHP Code:
unsigned char PIkDControl(char Kpchar Kichar Kdint error) {
    static 
int errorTotal 0;  //there is a better way to do this... meh
    
static int prevError 0;
    
int P 0;
    
int I 0;
    
int D 0;
    
    
= (error*Kp)/100;
    
= (errorTotal*Ki)/100;
    
= ((error prevError)*Kd)/100;

    
errorTotal += error;
    
prevError error;

    return  (
Limit_Mix(2000+127+P+I-D));

There are a couple of other tweaks, but i edited them out. you should come across them whilst testing (=
__________________
A few of my favorite numbers:
175 176 177 195 230 558 716 1024 1071 1592 1784 1816
RPI 2012
BREAKAWAY

Last edited by Uberbots : 26-01-2007 at 00:22. Reason: MINUS D NOT PLUS D... oops
 


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
Turning 18... Astronouth7303 Chit-Chat 16 22-05-2006 09:29
Turning Trouble! Cadetdan General Forum 18 05-03-2005 08:55
Slowing down Camera drive turning Zalumaskov Programming 1 27-02-2005 10:11
Connections For Camera Eupher Programming 3 02-02-2005 14:35
Canadian fined for turning left while on his Segway MrToast Dean Kamen's Inventions 2 21-10-2004 17:34


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

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