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: Re: 3 Pin ultrasonic sensor in galileo. The thread is in the Galileo forum but it's applicable for the Edison as well.
Thank you Sir - it's a pity that I will require a different circuit for the Edison, but at least I will be able to get it working!