RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Idea how to control PC power using state switch

    Scheduled Pinned Locked Moved Help and Support
    arcade 1updesktoplinuxpower switchretropie
    1 Posts 1 Posters 622 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      Melvin.FoX
      last edited by Melvin.FoX

      Hey there,
      I am trying to solve a puzzle :) I would like to upgrade Arcade 1Up cab - initially idea was to use RPi but it lacks a bit of power and my MUST HAVE is Die Hard Arcade. I have tiny Lenovo PC laying around and checked that it's capable of handling Die Hard Arcade and Killer Instinct (which would be a nice addition) which are not playable on Pi. Everything seems to be great but I've found one small problem that I have problem to solve :/
      Plan was to make A1Up cab non-invasive and do not mod it case that much (only coin buttons drilled as they are essential). So there is built in power switch and volume switch:
      alt text
      With Pi is no brainer - you simply use GPIO pins and few lines of code. Done. With PC it's a lot trickier. Of course I can use volume switch and connect it to one of players button and then assign it using Linux script. But here comes the power problem:
      pc is using stateless switch so it works more less like a press button that turns computer on or off. Power switch in A1Up has either state 0 or 1. Turning PC off using this switch should be doable but then I won't be able to power it back on unless I cut power off completely and power it back on again. I thought about some smart power strip but I wouldn't like to cut power off without proper shutdown.
      Do you have any ideas how I could solve this? :/
      --- EDIT ---
      Found out that one of recent Arduinos (with ATMega chip with "u" letter in symbol) is able to emulate HID device like keyboard. So theoretically I should be able to put switch to on or off and depending on what state Arduino will read then I should be able to send ALT + P command through USB port to wake pc up and some other shortcut to say to linux to shut system down.
      This YT vid should explain it better :)

      1 Reply Last reply Reply Quote 0
      • First post
        Last post

      Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

      Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.