Arduino Forum upgrade scheduled for Monday, October 20th, 11am-4pm (CEST). Sorry for the inconvenience!
Pages: [1]   Go Down
Author Topic: interfacing 4 HCSR04 sensors with arduino  (Read 721 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 0
Posts: 78
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
God Member
*****
Karma: 37
Posts: 514
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 - Teensy - Raspberry Pi
My libraries: NewPing - LCDBitmap - toneAC - NewTone - TimerFreeTone

Offline Offline
Jr. Member
**
Karma: 0
Posts: 78
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
Arduino Forum upgrade scheduled for Monday, October 20th, 11am-4pm (CEST). Sorry for the inconvenience!
Jump to: