Pages: [1]   Go Down
Author Topic: Problema ultrasonido hc-sr04  (Read 306 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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);

« Last Edit: March 11, 2013, 04:15:56 pm by vixtor » Logged

Pages: [1]   Go Up
Jump to: