Subject:
|
Re: Moving Straight
|
Newsgroups:
|
lugnet.robotics.handyboard
|
Date:
|
Mon, 28 Jun 1999 18:15:36 GMT
|
Original-From:
|
Curt Mills, WE7U <hacker@tc=antispam=.fluke.com>
|
Viewed:
|
768 times
|
| |
| |
On Mon, 28 Jun 1999, Sean Verret wrote:
> Is there anyone who has written or seen IC code that will keep a robot
> moving straight with 2 DC motors and four side sensors? 2 on each
> side. The main reason I ask is because one of my DC motors seems to put
> out more power that the other one and this moves faster and my robot
> like to turn into walls....
>
> I'm using the analog sensor inputs with IR sensors - the values range
> from 0-255
> 255 being can't see anything, and 0 being right against a wall..
>
> I was thinking something like - if back left > 128 speed up left motor
> or decrease right motor speed and similar scenarios for the other
> sensors....
>
> I'm asking just to save myself some time.... If anyone can help that'd
> be greatly appreciated!!
Sorry, I do other things with my controllers than control robots (shame
on me!). From other discussions I've seen though, I would think that
you could use some feedback from the turning shafts, like optical turns
counters or some such. I wouldn't imagine that trying to use IR sensors
for distance would work very well. If you were moving quite slowly, then
maybe...
Another thing that might make this easier is to use the smooth-PWM
routines, which give you much finer control over the speed of each motor
than the standard Interactive-C routines. You'll still need to close
the control loop though.
Curt Mills, WE7U hacker.NO_*SPAM@tc.fluke.com
Senior Methods Engineer/SysAdmin
"Lotto: A tax on people who are bad at math." -- unknown
"Windows: Microsoft's tax on computer illiterates." -- WE7U
|
|
Message is in Reply To:
| | Moving Straight
|
| Is there anyone who has written or seen IC code that will keep a robot moving straight with 2 DC motors and four side sensors? 2 on each side. The main reason I ask is because one of my DC motors seems to put out more power that the other one and (...) (25 years ago, 28-Jun-99, to lugnet.robotics.handyboard)
|
6 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|