Pages: [1]   Go Down
Author Topic: interfacing 4 HCSR04 sensors with arduino  (Read 621 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 0
Posts: 77
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Toledo, OH
Offline Offline
Sr. Member
****
Karma: 19
Posts: 455
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Tim
Logged

Arduino Uno - Teensy 2.0 - Teensy 3.0 - Raspberry Pi Model B w/512MB RAM
My libraries: NewPing library - LCDBitmap library - toneAC library - NewTone library

Offline Offline
Jr. Member
**
Karma: 0
Posts: 77
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Pages: [1]   Go Up
Jump to: