Go Down

Topic: Problema ultrasonido hc-sr04 (Read 354 times) previous topic - next topic

vixtor

Mar 08, 2013, 09:23 pm Last Edit: Mar 11, 2013, 10:15 pm by vixtor Reason: 1
Hola queria saber si este programa que e encontrado por internet sirve para el sensor hc-sr04, el que esta es otro sensor de ultrasonido.

Quote


  pinMode(pingPin, OUTPUT);
  digitalWrite(pingPin, LOW);
  delayMicroseconds(2);
  digitalWrite(pingPin, HIGH);
  delayMicroseconds(5);
  digitalWrite(pingPin, LOW);

  pinMode(pingPin, INPUT);
  duration = pulseIn(pingPin, HIGH);

  inches = microsecondsToInches(duration);


Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy