Subject:
|
Dave Baum's scanbot w/ bumper?
|
Newsgroups:
|
lugnet.robotics.rcx
|
Date:
|
Wed, 27 Sep 2000 21:42:18 GMT
|
Viewed:
|
1546 times
|
| |
| |
I was programming a "scanbot" from the Definitive Guide and wanted to install a
bumper as I noticed the robot would run into things periocically while
"searching" for the light. I wrote some code as follows:
void check_bump
{
if (BUMP == 1)
{
Rev(RIGHT+LEFT);
OnFor(RIGHT+LEFT,300);
Fwd(RIGHT+LEFT);
}
}
I put this call between the "scan" and "steer" functions and it doesn't seem to
work right. It detects when it has hit something and backs up, but then the
robot only will "scan". It quits moving and "steering". I have moved the
function around a bit, but to no avail. Any suggestions on how it can do all 3
functions basically at the same time.
Thanks,
Christopher
|
|
Message has 1 Reply: | | Re: Dave Baum's scanbot w/ bumper?
|
| (...) The problem is subtle. Scanbot (at least scanbot2.nqc) assumes that the drive motors are always running. It only alters their direction during steering. In your code you call OnFor(), which turns on the motors, waits a specified amount of (...) (24 years ago, 4-Oct-00, to lugnet.robotics.rcx)
|
2 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|