A robot is programmed to move forward F meters and backwards again, say B meters, in a straight line. The Robot covers 1 meter in T units of time. On Robot's path there is an obstacle after distance D from initial position in forward direction. This forward and backward movement is performed repeatedly by the Robot.

Your task is to calculate amount of time taken before the Robot hits the obstacle.

I am a boy who loves electronics


The robot will need a Mic an I'd mch589 which is a micro processor
you will also need arduino nano
the programming for mch589 is
main ()
void ()
if snd ("f");
power m1;
{if snd("b");
power m1 opp;