There always comes a time when you repeatedly smack your head against the wall trying to solve a problem, and the answer is so trivial that you want to poke yourself in the eye afterwards. In the previous post(s), I mentioned that I was only getting 1.7v out of digital Pin0. When using a multimeter on just the pin itself with no load, I discovered that I was getting a constant 3.3v. So just to play and debug further, I brought up the example “blink” app and modified it to send a signal to Pin0 along with the onboard LED. Again, I found that I was getting a constant 3.3v. Surely something was wrong – this should have been switching from high to low along with the LED. Yes, something was wrong – my code! Here’s what I had:
pEnable = new OutputPort(Cpu.Pin.GPIO_Pin0, false);
Yeah, so GPIO_Pin0 is not digital Pin0. Arrgh. The correct code should be (and is now checked in):
pEnable = new OutputPort(Pins.GPIO_PIN_D0, false);
And because of this, we can completely disregard my last post. No transistor needed. Dumb. But awesome.
In a week or so, I’ll try to post a video of it in action and include a schematic and final parts list. With Thanksgiving this week, there’s a slim to none chance it will get done this week. Which is too bad, because with Black Friday, I’m sure there will be a Woot-Off or two.