|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#6
|
|||
|
|||
|
3 ways (that I can think of):
-Make a counter. Crude example code below. Count = Count + delta_t + 1 If count < (value) PWM1 = 255 PWM2 = 255 goto end_drive 'if finished, do nothing PWM1 = 127 PWM2 = 127 end_drive: -Use the gyroscope and record your angular velocity (or is it acceleration?). Manipulate the data to suit your needs. -What I call 'CSS'. Basically, it is a wheel with sensors on or near it. See this post: http://www.chiefdelphi.com/forums/sh...&threadid=1814 Instead of measuring forward velocity, you would want a "magic wheel" and have it pointed sideways. Or, you can make two and put them on either side of your robot and measure the difference. I believe the last idea is the best, but it is also the most complex. |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| PBASIC ARCTAN function | Greg Ross | Programming | 14 | 11-05-2003 12:28 |
| Obscure PBASIC for RoboEmu | rbayer | Programming | 1 | 28-03-2003 23:57 |
| PBasic 2.5 vs. 2.0 | Anthony Kesich | Programming | 6 | 09-02-2003 22:06 |
| Diagrams for wiring of 15 and 25 pin connectors | archiver | 2000 | 2 | 23-06-2002 23:03 |
| Subtotaling in PBASIC? | Ian W. | Programming | 17 | 02-02-2002 20:22 |