
Best Answer Chris Walker, 14 May 2015 - 08:12 AM
Hi volleynerd,
This issue has been fixed in the new 4.3.2.2 firmware:
http://forums.netdui...-v432-update-2/
Thanks again for reporting the bug,
Chris
Go to the full post
![]() |
  | |||||||||||||
![]() |
|
![]() |
||||||||||||
![]() Newbie: onboard button in a program
Started by volleynerd, May 14 2015 12:22 AM
![]() Best Answer Chris Walker, 14 May 2015 - 08:12 AM
Hi volleynerd,
3 replies to this topic
#1
Posted 14 May 2015 - 12:22 AM Hello - I'm back on the netduino bandwagon after playing with it a couple years ago.
I have a Netduino 3 WiFi board. Trying to work with the onboard button in a program. Should be so simple. I've searched through the boards and web a bit, can't find an answer.
My understanding is that the onboard button is dual purpose - it will (a) reset the board, or (
When running the program below, when I press the onboard button, the board resets. What am I doing wrong?
static OutputPort led = new OutputPort( Pins.ONBOARD_LED, false );
static InputPort button = new InputPort( Pins.ONBOARD_BTN, false, Port.ResistorMode.Disabled );
static bool buttonState = false;
public static void Main()
{
led.Write( false );
while ( true )
{
buttonState = button.Read();
led.Write( buttonState );
}
}
#2
Posted 14 May 2015 - 01:06 AM
Hi volleynerd,
Ack, that's a bug. We physically wired up the button to two MCU pins on Netduino 3 Wi-Fi, but ONBOARD_BTN is pointing to the inactive pin. [The dual-wiring is there for some advanced future scenarios.] In the meantime, can you please reply your line of code with the physical pin #--and let us know if that fixes the issue for you? //static InputPort button = new InputPort(Pins.ONBOARD_BTN, false, Port.ResistorMode.Disabled); /* replaced by... */ static InputPort button = new InputPort((Cpu.Pin)0x15, false, Port.ResistorMode.Disabled);We'll fix the core mis-assignment in a 4.3.2.2 quick patch by the weekend. Sorry for the glitch, and thank you very much for letting us know. Chris
#3
Posted 14 May 2015 - 08:12 AM Best Answer
Hi volleynerd,
This issue has been fixed in the new 4.3.2.2 firmware: http://forums.netdui...-v432-update-2/ Thanks again for reporting the bug, Chris
#4
Posted 14 May 2015 - 03:36 PM Yep, indeed with that workaround, the program works fine. Little did I know I was "doing it right" ...
Thanks a lot for the help! 0 user(s) are reading this topic0 members, 0 guests, 0 anonymous users | ||||||||||||||
![]() |
||||||||||||||
![]() |
|
![]() |
||||||||||||
![]() |
This webpage is licensed under a Creative Commons Attribution-ShareAlike License. | ![]() |
||||||||||||
![]() |