|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#2
|
|||
|
|||
|
Re: Any Examples Of Ready To Go Autonymous Code Out There ?
How simple is simple?
How about driving forwards for about 5 seconds, and then stopping? There are good threads on using arrays to do multiple-step routines, using a "timer" like this. Consider this a specific answer to a vague question. //add this to the top of the user_routines_fast.c file int timer =0; /*this is the section of User_Autonomous_Code() in user_routines_fast.c that you want to edit*/ while (autonomous_mode) /* DO NOT CHANGE! */ { if (statusflag.NEW_SPI_DATA) /* 26.2ms loop area */ { Getdata(&rxdata); /* DO NOT DELETE, or you will be stuck here forever! */ /*****************/ //here is the change if(timer < 190) pwm01 = pwm02 = pwm03 = pwm04 = 255; else pwm01 = pwm02 = pwm03 = pwm04 = 127; timer++; /******************/ Generate_Pwms(pwm13,pwm14,pwm15,pwm16); Putdata(&txdata); /* DO NOT DELETE, or you will get no PWM outputs! */ } } |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Out of the Box Camera Code | russell | Programming | 9 | 21-10-2009 05:28 |
| Team THRUST - Kevin's Code and Camera Code Combine | Chris_Elston | Programming | 3 | 31-01-2005 22:28 |
| Sourceforge for Code Repository and other stuff | SilverStar | Programming | 9 | 15-01-2005 21:16 |
| heres the code. y this not working | omega | Programming | 16 | 31-03-2004 15:18 |
| Custom Dashboard code for LabVIEW ready for download. | archiver | 2001 | 3 | 24-06-2002 00:49 |