0

Automatically Powering down the Mains Supply for a Raspberry Pi @Raspberry_Pi #PiDay #RaspberryPi

via Element 14 Community

One of the few things that bugs me about shutting down the the Raspberry Pi is how I need to toggle the power supply to start it back up. There are a few solutions around, like an inline power switch, or the MoPi shield.. or just pull the micro USB plug out of the socket & plug it back in again. None of these I was particularly impressed with, and I wanted something a bit more intuitive & automated (which makes it easier for the kids and wife to use).

In a previous project, I’d used an Energenie power socket to turn a bass speaker off/on with the TV, and I had a spare socket (there are 2 in the box) doing nothing. What I’ve been able to do is set up a PHP script on the Pi that has the Energenie controller & have that control a socket that another Pi is connected to. When the other Pi is shutting down, I can call that PHP script and tell it to turn off the socket after a few seconds (giving the Pi enough time to shut down).

See full breakdown here!


3055 06Each Friday is PiDay here at Adafruit! Be sure to check out our posts, tutorials and new Raspberry Pi related products. Adafruit has the largest and best selection of Raspberry Pi accessories and all the code & tutorials to get you up and running in no time!


Make a robot friend with Adafruit’s CRICKIT – A Creative Robotics & Interactive Construction Kit. It’s an add-on to our popular Circuit Playground Express, FEATHER and other platforms to make and program robots with CircuitPython, MakeCode, and Arduino. Start controlling motors, servos, solenoids. You also get signal pins, capacitive touch sensors, a NeoPixel driver and amplified speaker output. It complements & extends your boards so you can still use all the goodies on the microcontroller, now you have a robotics playground as well.

Join 7,500+ makers on Adafruit’s Discord channels and be part of the community! http://adafru.it/discord

CircuitPython in 2018 – Python on Microcontrollers is here!

Have an amazing project to share? Join the SHOW-AND-TELL every Wednesday night at 7:30pm ET on Google+ Hangouts.

Join us every Wednesday night at 8pm ET for Ask an Engineer!

Follow Adafruit on Instagram for top secret new products, behinds the scenes and more https://www.instagram.com/adafruit/


Maker Business — Despite multiple bankruptcies, RadioShack continues to find ways to keep the lights on

Wearables — Tape, meet 3D printing

Electronics — A few words on inductor resistance

Biohacking — Running Blades

Python for Microcontrollers — CircuitPython is officially awesome!

Get the only spam-free daily newsletter about wearables, running a "maker business", electronic tips and more! Subscribe at AdafruitDaily.com !



No Comments

No comments yet.

Sorry, the comment form is closed at this time.