Programmer Turns Raspberry Pi CPU Into a Button

Making cool projects on the Raspberry Pi is more often than not the whole point of having one. The single-board computer's 40 GPIO pins make it possible to attach a seemingly endless selection of external sensors, buttons and more but maker Mcllrn decided this was no longer necessary. Using nothing more than the CPU by itself, Mcllrn has managed to turn the processor into a functioning button you can use for input in any Python program. 

Add this to our list of things you can do with a Raspberry Pi that you probably should not do. In the spirit of pushing the Pi to its limits, we had to feature this project as it’s one of the most clever uses of the CPU we’ve seen so far.

Check out the original Reddit thread to get a closer look at this awesome CPU button project and see it in action. 

Ash Hill
Contributing Writer

Ash Hill is a contributing writer for Tom's Hardware with a wealth of experience in the hobby electronics, 3D printing and PCs. She manages the Pi projects of the month and much of our daily Raspberry Pi reporting while also finding the best coupons and deals on all tech.

  • When Mcllrn touches the processor with a bare finger, the temperature rises.
    It's actually the other way around. The finger cools the CPU down.

    According to the OP on Reddit:
    As I’m touching the CPU, its temperature drops, I’m detecting those drops and registering it as a “button press” which changes the color of the font on the screen
    Reply
  • klarkent
    I find it kind of incredible that people in Tom's Hardware think that a finger could raise the CPU temperature 😅 unless you're lava man... Sure!
    Reply
  • JWNoctis
    Comes winter and this could easily become a fry-my-Pi-with-static-electricity button.

    Intriguing, but do use caution.
    Reply
  • TerryLaze
    JWNoctis said:
    Comes winter and this could easily become a fry-my-Pi-with-static-electricity button.

    Intriguing, but do use caution.
    As long as you only touch the heat sink it should be safe, I mean we slap big chunks of metal on there, if it would let electricity through we would have a very bad time with CPUs in general.
    Reply