Picture of PINGBot - Explorer Robot
PINGBot is the Explorer Robot that uses an ultrasonic sensor to be able to dodge objects present in its path.

The ultrasonic sensor emits pulses at a frequency of 40KHz (imperceptible to the human ear and animals), these pulses when hitting an object, they are reflected and return to the sensor after a certain time; knowing the total time round the wrists and the speed of sound in the medium (the air), it is easy to calculate the distance traveled by the wrists and thus determine the distance of the object relative to the sensor.
See the post about PING sensor for details in 

We will use the same chassis of the BUGBot ... but currently with a dual H-BRIDGE / L298H to control two DC motors (control direction and speed), which will give greater flexibility to our prototype.

The basic operation is as follows:

When booting the robot will remain stopped and the sensor calculates the distance FRONT, RIGHT and LEFT, he will compare these distance with a threshold distance (i.e.20 cm) so it can decide which is the best way to forward (the longest path will always be the best option! ).
After that the Robot will begin to running forward until the moment they will find an object interfering with your progress (it should approach the maximum limit up to a distance, in inches, of the object), when it happens: it will stop and analise again distances: FRONT, RIGHT and LEFT, so he could again decide which is the best way to forward - returning again to the operating cycle.
Remove these adsRemove these ads by Signing Up
asmhemu27 days ago

Hi Sir!

My name is Himu,from Bangladesh.

Can you sent me the code and libraries please.


Thank you!

PauloM41 month ago

Humm.. According Arduino specs, you should provide at least 7V to arduino.

So, the connection from the +5V on the bridge to the arduino Vin PIN will provide less input that required for stable operation. Certainly better to use external power source for arduino!

larsboi1 month ago

I have build the bot based on the chineese knockoff, I have tested all subsystems to veryfi they run, but when i load the sw it misses the ping and wprogram. i just have updated to ide 1,60

du you have an updated version ?


tranduyenit2 months ago

Hi Sir!
My name is Duyên, i come from Viet Nam.
Can you sent me the code, My
Thank you!

omani773 months ago

hello ... I want the code if u can

KOTSOS51 year ago

Hello my friend could you send the code to me also?

preddy1261 year ago
can i get the program ...................
BIGDOG1971 (author)  preddy1261 year ago
Hi Preddy

Sure I can share the code with you.

Send me an email and I will be glad to send you the code and libraries.


Marcelo Moraes
BIGDOG1971 (author)  preddy1261 year ago

Send me an email and I can share the code with you.

hello alos can you send me codes please. ı want make that for my project of lesson. my e-mail is :

ı sent you an e-mail if you received to it .

preddy1261 year ago

pls send me code to above email id....

BIGDOG1971 (author)  preddy1261 year ago
Hi Preddy126

For sure. I am sending the code to your email.


Marcelo Moraes