wellslight
54049
805
32
the on/off button is just a tactile switch nestled under the hood. I carved out a lego piece to put the button in so it would lock into the set up.
I took out a 1x4 block right in front of the clear red bricks to stash the LED/resistor, and fed the wires out one side. This puts the LED directly behind the clear red bricks so when it lights up you can see it shine through.
Cut a square out of the lego brick the size of the power button.
Wired up the power button so that it can be unplugged if the lid of the NES needs to be removed.
When installing the button it would fall back when I pushed on it, so I added a piece of another lego's wall to give resistance, then I tucked the wires into the lego piece and covered it all in hot glue.
This is where it sits on the lid of the NES. I added a few extra parts to the lid for support and hot glued them together.
When it is plugged into the pi... Putting the power button on GPIO3 (pin 5) and a ground makes it so the button can power on the pi, then you program that button to have a shutdown script.
This is the python script for the LED. You then add a line to /etc/rc.local to run it on startup. There is a slight delay between power up and the light turning on, which I'm sure could be fixed by running the script in an earlier startup process but I didn't care.
This is the script for the shutdown portion of the button, also needs to be added to /etc/rc.local (as shown below).
This is what runs these scripts on startup. All you need to add to this script is the two "sudo python...." right before "exit 0".
Original design credit and parts list:http://imgur.com/a/fQJqc
http://www.brickowl.com/wishlist/view/stinkypickles/legopi
imgonnagetfiredbecauseofthiswebsite
Nice!!
SarahKercz
Oh mah damn
DisagreeingTeddyBear
Fuck yes.
lud1
you don't fucking glue lego, heretic!
Arcman304
Awwww shit ya good job dude
benisglory
Awesome!
MaelinStarpyre
SalPic
I always upvote Lego
WenzelDashington
Lol penis
WhatTheDormouseSaid
Your title forgot the part where the whole outfit is made of MOTHERFUCKING LEGOS!! +1
Steelhart
This exactly. Lego just made it waaaay better.
fourtoomany
Couldn't you use 1x1 for the power switch or a technic piece? The cut looks pretty rough
wellslight
the tactile switch is just a little bigger than the 1x1 so the cut would've looked even worse. Maybe it'd work if you shave the button sides
kytrix
So you broke a perfectly good NES. Shame.
wellslight
Yup bought a perfectly good lego NES and broke it and put the pieces into a lego NES. Darn shame I wasted that perfectly good NES
Muffyns
confused
kytrix
And it rises again, living a new life. ????
SpecimenSpiff
I think you're confused...
kytrix
No, I was just sleepily shitposting. My bad.
3vil3ric
Why hot glue and not KRAGLE?
wellslight
Kragle leaks out the sides and won't come off, makes it look bad.
cmdshift3
Of all the things they done with the Pi in recent years, a power switch should have been higher priority.
wellslight
They did make it so that if you short out GPIO3 it boots the pi up, but I agree, a button would be nice
Dedrick427
I didn't know this and was LITERALLY making an on/off switch. You saved me this trouble. <3
wellslight
Yeah! Then you can write a python program (like above) to make that same button shutdown the pi.
DoctorDelta
Posting your PiNes on Imgur? Bold move.
benisglory
I scrolled past this, then I was like "oh" and had to come back to upvote, well done sir!
wellslight
I'm out of the loop, why is this a bold move?
JustASlightJingleOfPocketChangePulsing
Wow......
GawdDamnTheseElectricSexPants
penis.
SpecimenSpiff
Don't worry. I didn't get it either...
Rapturr
ReadyToTingle
Penis
mistertime
You cut a Lego!? How dare you hurt my babies!
DevCon96
That ain't the worst of it! Op then proceeds to glue the lego together! These truly are unlawful time...
plastikman
Damn that kragle!
DevCon96
We must find the piece of resistance!
Muffyns
kraft glue