In my project i want to read from three different ultrasonic and make action depend on each reading to appear on RGB LED MATRIX, for example
For ultrasonic 1 if the distance is 1m will show red led on the LED matrix
For ultrasonic 2 if the distance is 3m will show yellow led on the LED matrix
For ultrasonic 3 if the distance is 5m will show green led on the LED matrix
And all connect to the same LED Matrix.
Is this possible using the Arduino?
See THIS: page about Ultrasonic Sensors. There is example code for making distance decisions.
The “NewPing” library does support multiple Ultrasonic sensors. See information HERE:
Tim has an example with 15 sensors!
Those (small) sonic rangers don't do well beyond a couple of meters so the 3m and 5m will be very challenging to achieve. Instead, get some maxbotix sonic rangers that can actually measure that distance. I imagine this is outdoor? Maxbotix has outdoor sensors as well. The refresh rate isn't terribly high, around 6-7 data points per second. What's your requirement for speed? 5m one-way distance is 0.03 seconds round-trip time if you assume sound speed at 340m/s.
thanks terry for the suggestion website, it's very helpful.
liudr - I choose the XL-Maxsonar EZ2 for my project. it detects object about 7m away. you are correct I will use it for outdoor but I think for a "prototype" it's too much expensive to get the outdoor sensor.
Have a smaller prototype, shrink things to 1:5, and use the indoor cheap sensors. If you feel good about the prototype, try some outdoor sensors. I agree with you, maxbotix sensors are not cheap.