- Fri Mar 28, 2014 2:27 pm
#169863
I posted this question on the Pololu forum, but haven't received a response yet. I am starting to get disperate so I thought I would see if anybody from Sparkfun could lend some guidance. Here is the link to that..
The switch product page is here
above is a image of my current setup, which allows for the the first button press to turn on the Arduino. Subsequent button presses do not shut down the power, which is great and works great. What I'm trying to achieve is being able to have the Arduino read when that same button is pressed additional times (besides the first press).
So in essence:
1. First press of the button turns on the Arduino
2. Second press of the button is detected by the Arduino and starts a shutdown process
3. When the Arduino is finished shutting down, it sets "off pin" on the switch and powers down.
What is the setup to allow the above without causing additional battery drain?
I'm very new to embedded electronics. It seems to me like the solution would involve connecting a wire from an open digital pin on the Arduino to either the positive side of the push button with a pull - down resister towards ground or the negative side with a pull - up towards positive.
Here are two setups I've tried, but no luck.
Is what I'm trying to achieve even possible with this switch? could you provide a simple example setup where your switch would:
1. first push of a button power a controller on.
2. subsequent button pushes of that same button did not power off the controller.
3. the controller was able to detect when that button was pressed.
The switch product page is here
above is a image of my current setup, which allows for the the first button press to turn on the Arduino. Subsequent button presses do not shut down the power, which is great and works great. What I'm trying to achieve is being able to have the Arduino read when that same button is pressed additional times (besides the first press).
So in essence:
1. First press of the button turns on the Arduino
2. Second press of the button is detected by the Arduino and starts a shutdown process
3. When the Arduino is finished shutting down, it sets "off pin" on the switch and powers down.
What is the setup to allow the above without causing additional battery drain?
I'm very new to embedded electronics. It seems to me like the solution would involve connecting a wire from an open digital pin on the Arduino to either the positive side of the push button with a pull - down resister towards ground or the negative side with a pull - up towards positive.
Here are two setups I've tried, but no luck.
Is what I'm trying to achieve even possible with this switch? could you provide a simple example setup where your switch would:
1. first push of a button power a controller on.
2. subsequent button pushes of that same button did not power off the controller.
3. the controller was able to detect when that button was pressed.