Hi EduinoPi,
There is a particular situation with the Edison and the Ultrasonic sensors, or similar devices, that use one pin as an output and input. With this type of devices the workaround is using two pins instead of one. One pin will be the input and the other one the output. Check the following thread, there are more details in there and I think you will find it helpful:
. The thread is in the Galileo forum but it's applicable for the Edison as well.
Regards,
Diego.