Best Answer Chris Walker, 28 April 2015 - 06:22 PM
Hi navinedrev,
Here is an adaptation of the code we use to detect VBUS during the manufacturing QA process... [ We do fairly thorough testing on each board ]
InputPort vbusDetect = new InputPort((Cpu.Pin)0x09, false, Port.ResistorMode.PullDown); if (vbusDetect.Read() == false) { Debug.Print("VBUS not detected."); }VBUS is "USB bus voltage". When a USB cable is connected, you'll see voltage (high state / true) on that pin. By using the PullDown internal resistor, one avoids getting false high readings from a disconnected (floating) pin.
Does that get you on the right path?
Welcome to the Netduino community,
Chris Go to the full post