United Kingdom
Asked — Edited
Resolved Resolved by Dunning-Kruger!

Two Distance Sensors (Script)

Hi there,

sorry if this is a duplicated post, my tablet appears not to have posted my original.

i am loving my dev kit and learning stacks, but i apart from some Arduino i have not ventured into programming.

what i am looking at is as follows, i currently have an ultrasonic sensor on a servo "scanning" as Traxx moves forwards, however i have noticed that it sometimes it cause a blind spot. so i was thinking by adding a IR sensor constantly facing forward and some coding i could avoid the blind spot by allowing the EZ-B to "decide" which sensor to listen too, depending upon distance.

thanks


ARC Pro

Upgrade to ARC Pro

ARC Pro is more than a tool; it's a creative playground for robot enthusiasts, where you can turn your wildest ideas into reality.

United Kingdom
#9  

Thanks @Rich and @Richard r. My next choice was to add ping_wait funtion to tell traxx to wait until the ping reading was higher than the ir reading, then move away from the object Am I right in thinking that by adding the forward command in, its like telling the system to revert back to scanning when moving forward until the ping sensor/ir sensor detects an object?

United Kingdom
#10  

My latest Ping Roam uses ping_wait in it's turning action, basically;


Left()
Ping_Wait(D0,D1, Higher, 20)
Forward()

Provided somewhere in the script before the whole ping/ir checking process you have a Forward() then ending the checking with a Forward() will make the robot avoid an object then continue on it's way.