|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#19
|
|||
|
|||
|
Re: Potentiometer PID
instead of
Code:
if ( Button1 == 1 )
{
Target = 200 ;
}
else if ( Button2 == 1 )
{
Target = 400 ;
}
else if ( Button3 == 1 )
{
Target = 600 ;
}
Code:
if ( (Button1 * Button2) + (Button2 * Button3) + (Button3 * Button1) + ( Button1 + Button2 + Button3 ) == 1 ) //prevents crazy values if more than one button is pressed and keeps the same value if no button is pressed
{
Target = (Button1 * 200) + (Button2 * 400) + (Button3 * 600)
}
Last edited by NextPerception : 21-01-2007 at 02:55. |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Potentiometer help | Unholy | Programming | 4 | 07-02-2006 17:48 |
| Potentiometer Help! | thoughtful | Programming | 4 | 18-02-2005 08:21 |
| coding a potentiometer | incognito_NICK | Programming | 5 | 14-02-2005 15:56 |
| Potentiometer | Joshua May | Technical Discussion | 8 | 22-05-2004 19:51 |
| Potentiometer Theory | Ulibrium | Technical Discussion | 6 | 25-01-2002 21:16 |