luigif/hcsr04

Incorrect setup graphic?

jthatch12 opened this issue · 3 comments

Hey, I've been trying to get this to work on my BBB. I've setup my circuit like 40 times by now in the same fashion shown on your git but everytime I run the program it executes as the following

  • ./hcsr04

    Initializing PRU
    Executing HCSR-04 code
    1: Distance = 4.16 cm
    2: Distance = 4.16 cm
    3: Distance = 4.16 cm
    4: Distance = 4.16 cm
    5: Distance = 4.16 cm
    6: Distance = 4.16 cm
    7: Distance = 4.16 cm
    8: Distance = 4.16 cm
    9: Distance = 4.16 cm
    10: Distance = 4.16 cm
    11: Distance = 4.16 cm
    12: Distance = 4.16 cm
    13: Distance = 4.16 cm
    14: Distance = 4.16 cm
    15: Distance = 4.16 cm
    16: Distance = 4.16 cm
    17: Distance = 4.16 cm
    18: Distance = 4.16 cm
    19: Distance = 4.16 cm
    20: Distance = 4.16 cm
    PRU Disabled.

Any ideas what I might be doing wrong?

The picture is correct, so if you set up things according to the picture it should work.
Maybe you have a faulty sonar module?

I got the circuit to work, I have 5 sensors and they all perform the same.
The circuit seems to not work when pointing forward on a breadboard. Seems
to only function when pitching slightly upward

On November 5, 2014 12:34:49 PM luigif notifications@github.com wrote:

The picture is correct, so if you set up things according to the picture it
should work.
Maybe you have a faulty sonar module?


Reply to this email directly or view it on GitHub:
#2 (comment)

The sensor generates a wave that expands also in the vertical direction.
If you position the sensor on a breadboard over a table it will get the vertical reflection from the table before any other reflection.
You might want to put the breadbord over a book or, as you did, just point the sensor a little bit upward.