This project is based off of a websites project, Stampy from societyofrobots
My setup is:
Picaxe 28x1 using L293D in the motor driver port of the project board
Servo
Sharp IR Rangefinder
2 Standard DC motors /w wheels
The Servo pans with the IR mounted on top.
It will use edge detection to decide where to drive. If no target is available, it would go into a search mode and spin clockwise. Otherwise, it would attempt to drive towards the left side of opposing objects.
Brief description of code wanted
//scanner code
if sharp IR detects object
scanning IR turns left
else //no object detected
scanning IR turns right
//robot motion code
if scanner is pointing far left
robot turns left
else if scanner is pointing far right
robot turns right
else //scanner pointing forward
robot drives straight
It will go left until it spots an object, if nothing detected, it will turn right until it does, resulting in the scanner converging on the left edge of the object.
If the sensor misses the object and rotates to the right to its maximum position, tell the scanner to reset its angle to the far left.
I ask for the code because edge detection is such a common idea, it must have been used in many projects, and so I ask if anyone has any codes I could use for this?
My setup is:
Picaxe 28x1 using L293D in the motor driver port of the project board
Servo
Sharp IR Rangefinder
2 Standard DC motors /w wheels
The Servo pans with the IR mounted on top.
It will use edge detection to decide where to drive. If no target is available, it would go into a search mode and spin clockwise. Otherwise, it would attempt to drive towards the left side of opposing objects.
Brief description of code wanted
//scanner code
if sharp IR detects object
scanning IR turns left
else //no object detected
scanning IR turns right
//robot motion code
if scanner is pointing far left
robot turns left
else if scanner is pointing far right
robot turns right
else //scanner pointing forward
robot drives straight
It will go left until it spots an object, if nothing detected, it will turn right until it does, resulting in the scanner converging on the left edge of the object.
If the sensor misses the object and rotates to the right to its maximum position, tell the scanner to reset its angle to the far left.
I ask for the code because edge detection is such a common idea, it must have been used in many projects, and so I ask if anyone has any codes I could use for this?