Hi,
i want to use my us sensor with an panda fez 2.
But i don’t know how to convert a Output to an Input.
Us sensor : http://www.parallax.com/dl/docs/prod/acc/28015-PING-v1.3.pdf
My code :
public long US()
{
long duree, distance;
OutputPort USport = new OutputPort((Cpu.Pin)FEZ_Pin.Digital.Di52, false);
Thread.Sleep(2);
USport.Write(true);
Thread.Sleep(5);
USport.Write(false);
USport = null;
InputPort USport = new InputPort((Cpu.Pin)FEZ_Pin.Digital.Di52, false, Port.ResistorMode.Disabled); //don't work }
but the end of my code don’t work, help me please.