Jump to content


  • Content Count

  • Joined

  • Last visited

About JcOaCrO

  • Rank
    Noob Class

Profile Information

  • Location
  1. No scope. I found fluke graphic multimeter but probably signal is fast to be measured. There's a ttl test with beep on it and when i make the delay between measurements 1 second i get the beep in that interval both on the echo and trig. pin. So i guess it works . I though there's a problem in the software. Also found an arduino example with the same sensor where the 1000 microseconds is replaced with 10. Tried that an still no sucess. When i try to print the duration variable on the console it's also 0 so seems there's no echo signal. Hope it's not a broken module since i would have to wait
  2. Hi I have the old board with 2231 and tried connecting the ultrasonic sensor without success. First, here's the code I'm using: void setup() { Serial.begin (); pinMode(P1_5, OUTPUT); pinMode(P1_4, INPUT); } void loop() { int duration; int distance; digitalWrite(P1_5, HIGH); delayMicroseconds(1000); digitalWrite(P1_5, LOW); duration = pulseIn(P1_4, HIGH); distance = (duration/2) / 22; //za cm Serial.print(distance); delay(100); } The sensor vcc and gnd is connected on external 5v supply from the usb on the board. The trigger pin is directly connected to P1_5.
  • Create New...