Using the On-board push button as a on/off switch


hi everyone,
still newbie working arduino trying understand wondering how can use on-board push button on mega adk on/off switch. know have use interrupt because it's hardwired pin 2 , need turn on , off when clock changes, possible if 1 can lead me through this?

no, can't it.

the button on adk reset button.  hard wired reset pin, , pressing resets microcontroller.

i don't know specific chip, there may ways disable reset functionality , use pin input pin, disable ability program board @ all, you'd kind of stuck.

to want need external circuitry.  chip can't turn on own power, there no power run chip can turn power on.  kind of catch-22 situation.

you can create soft latching power switch using p-channel mosfet, has gate pulled vin  through resistor, button pulls down ground turn on.  arduino takes power mosfet, , when powers drives io pin high turns on npn transistor in turn shorts out power button keeping turned on.  can "release" npn transistor @ time setting io pin low, turns off power.

the other option not turn off power, enter sleep mode , wake on interrupt.  there's tutorials around web (and on playground believe) teach how work sleep mode.


Arduino Forum > Using Arduino > Programming Questions > Using the On-board push button as a on/off switch


arduino

Comments

Popular posts from this blog

VIDIOC_S_FMT error 16, Device or resource busy - Raspberry Pi Forums

using a laptop skeleton to build a pi laptop - Raspberry Pi Forums

Forum for Joomla? - Joomla! Forum - community, help and support