Hi,
I am trying to sense an input on GPIO_Pin1.
I assume this is the same as D1 on my Bee. I wanted to sense a positive 3-5 volts. So, I have the pin’s Resistor Mode set to PullDown. Here is my code:
InterruptPort IntButton = new InterruptPort(Cpu.Pin.GPIO_Pin1, false,
Port.ResistorMode.PullDown,
Port.InterruptMode.InterruptEdgeHigh);
IntButton.OnInterrupt += new NativeEventHandler(IntButton_OnInterrupt);
After I deployed this, I took a jumper and connected D1 directly to the 5V pin on the power header (note, my board is powered directly form USB - no hub).
I saw no reaction of my interrupt:
static void IntButton_OnInterrupt(uint port, uint state, DateTime time)
{
Debug.Print("Input High");
}
Then, I got a Windows message about my USB device was drawing too much power.
Now I can not get the Bee to show up whatsoever in my control panel. Not even when I hold down the LDR button. Followed all the directions I could find. Even have a USB Hub in place now. But, still no luck. The Bee’s Power LED turns on, and will even blink (sometimes) when I try to enter the Boot-loader mode. But nothing in Control Panel.
After the Input logic, my application should be toggling the debug LED on/off - that’s not happening either… so I don;t know what more (if any) it is in.
I am wondering if this is fried? I suspect I should have had a resistor in series, since basically I just shorted that 5V pin to ground. Arr…
I should have purchased more than Bee, and I will purchase some more now… Unfortunately I had the afternoon slated to work on this and will have to wait it out.