3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Using the Pololu Pushbutton Power Switch

Step 3And then magic happens...

At this point the switch will function as a push on/ push off switch for the Arduino. With a little code, the Arduino can switch itself off at an appropriate time! All that is required is setting pin 7 (in this example) to HIGH and the Pololu switch powers the Arduino down.

Here is some example arduino code:

int offPin = 7;           // Pololu connected to digital pin 7

void setup()
{
  pinMode(offPin, OUTPUT);  // sets the digital pin as output
}
void loop()
{
  delay(30000);            // wait for 30 seconds
  digitalWrite(offPin, HIGH);   // Sets the pin to HIGH and shuts down the Arduino
}

I hope you have found this useful. Please post in the comments if you use one of these in a project.

« Previous StepDownload PDFView All StepsNext Step »
1 comment
May 18, 2010. 8:26 PMgfxprotege says:
Hello. I have yet to purchase the pololu switch. I've been doing my research before going ahead with my project idea. I understand how this turns off the arduino. How would one go about turning it back on? 

Say you have a push button that you want to use to Turn on the arduino, and then let it time out after a little bit. Would you simply write in a method that reads if a button is pushed, to switch pin 7 to low?

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
7
Followers
6
Author:youevolve(Buildsomething)
Father of two active toddlers desperately trying to find the time to build every interesting project from Instructables. Slowly training the kids to love building things. The wife? She thinks we are a...
more »