|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#8
|
|||
|
|||
|
Re: [FTC]: Robot C
Quote:
motor[motorE] = joystick.joy1_y2; With C programming you set the thing on the left to the value on the right. The other way around shouldn't work. *Unless Robot C built it into the compiler to accept it both ways. Also as a note to save you guys a lot of frustration later. I would suggets you put in a "dead zone" that stops you from powering the motors with too little voltage. if ( ( joystick.joy1_y2 < -10) || ( joystick.joy1_y2 > 10)) { motor[motorE] = joystick.joy1_y2; } else { motor[motorE] = 0; } your motors will thank you. Second I've found throughout my tetsing that it is much better to program the buttons as such: if(joy1Btn(1) ) { code for what you want to happen here } else { code to make that stop happening } While there is not techinical difference in this case....for whatever reason the software gods seem to prefer it without the "==1" finally, while techinically yes...you could put autonomous code into the "code here" section but you could also run into some serious problems...unless you keep all of your logic sound. You can easliy start getting in trouble when you try things like this. |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [FTC]: Power Surge Robot | Nitro-Guy | FIRST Tech Challenge | 7 | 21-05-2009 10:30 |
| [FTC]: FTC Futures Forum at FTC World Championship | gdo | FIRST Tech Challenge | 0 | 08-04-2009 18:46 |
| [FTC]: FTC]: FTC Champ Tournament - Ontario (Scoring Breakdown) | Mr. Lim | FIRST Tech Challenge | 2 | 03-03-2008 11:54 |
| pic: FTC #3 robot design | Techno-Turkey | Extra Discussion | 5 | 06-02-2008 08:07 |
| [FTC]: [FTC]: Ontario Provincial FTC Start/End Times | cbhl | FIRST Tech Challenge | 8 | 16-12-2007 13:37 |