Ultrsonic sensor HC-SR04 and URM37 - Theremin issues

Multiman:
Hello! Im new around here so thanks in advance for the support and amazing comunity you guys Keep up!...

Anyway I hope someone can help me out with this issue I have... Im not really an expert in to code, I just have the right knowledge to change some things in the code, adapt very simple sketches... but right now I know I need help with this one :slight_smile:

I recently fund this project http://www.buildbrighton.com/wiki/Theremin which is an amazing MIDI controller (theremin like), using two Ultrasonic sensors URM37, a 20x4 LCD, encoder and 2 buttons. It uses a library called URMSerial.h for the sensors.

I have around 4 HC-SR04 Ultrasonic sensors... and I would love to be able to use them instead of the URM37, as they cost around 20€ each!...

URM37 http://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2012/xz227_gm348/xz227_gm348/URM3.2_Mannual_Rev2.pdf
HC-SR04 http://www.micropik.com/PDF/HCSR04.pdf

My questions are:

  1. Is it possible to adapt the sketch and use it with the Ultrasonic.h library that the HC-SR04 uses?
    or
  2. Is it possible to use the HC-SR04 as a URM37?

Many thanks in advance!!
All the best.

PD: This is the Sketch - Therething:

https://github.com/tub/Therething/blob/master/Therething.pde

For sure, I would start by using the NewPing library instead of Ultrasonic.h. You'll have nothing but problems with Ultrasonic.h, even worse problems if you're trying to use 4 sensors. NewPing is specifically designed to be fast, simple, small, accurate, and allow you to ping multiple sensors.

http://arduino.cc/forum/index.php/topic,106043.0.html

Tim