Go Down

Topic: interfacing 4 HCSR04 sensors with arduino (Read 1 time) previous topic - next topic


Hello. i have 4 sensors that i want to use to make a bigger version of this:

Where can i get a 4 sensor template for this kind of set up?

I already have the motors wheels, the arduino uno, batteries, speed controllers (using servo library and they work) and im waiting on the body.

i already made a smaller one to start me into this:

and im testing a 2 sensor template and i will see how i will go.
Any advice? Thank you very much  :smiley-mr-green:


What you need is the NewPing library.  It's designed for multiple sensors and being used in a complex system where it doesn't slow things down.  I include an example sketch that controls 15 sensors, so your 4 sensors is a cinch.

My hardware: Arduino, Teensy 2.0, Teensy 3.2 & custom ATmega328 systems
My libraries: NewPing, LCDBitmap, toneAC, toneAC2, NewTone, TimerFreeTone
My projects: http://www.DogBlocker.com/
My beer: Great Lakes Brewing Co. Lake Erie Monster


You sir are a genius i downloaded it ages ago but i had completely forgotten. thank you so much again.

Go Up