Rapberry Pi NES with working power light and power button

Feb 12, 2017 1:05 AM

wellslight

Views

54049

Likes

805

Dislikes

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

Nice!!

9 years ago | Likes 1 Dislikes 0

Oh mah damn

9 years ago | Likes 1 Dislikes 0

Fuck yes.

9 years ago | Likes 6 Dislikes 0

you don't fucking glue lego, heretic!

9 years ago | Likes 4 Dislikes 1

Awwww shit ya good job dude

9 years ago | Likes 3 Dislikes 0

Awesome!

9 years ago | Likes 1 Dislikes 0

9 years ago | Likes 1 Dislikes 0

I always upvote Lego

9 years ago | Likes 1 Dislikes 0

Lol penis

9 years ago | Likes 2 Dislikes 1

Your title forgot the part where the whole outfit is made of MOTHERFUCKING LEGOS!! +1

9 years ago | Likes 105 Dislikes 1

This exactly. Lego just made it waaaay better.

9 years ago | Likes 5 Dislikes 0

Couldn't you use 1x1 for the power switch or a technic piece? The cut looks pretty rough

9 years ago | Likes 2 Dislikes 0

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

9 years ago | Likes 1 Dislikes 0

So you broke a perfectly good NES. Shame.

9 years ago | Likes 1 Dislikes 3

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

9 years ago | Likes 4 Dislikes 0

confused

9 years ago | Likes 1 Dislikes 0

And it rises again, living a new life. ????

9 years ago | Likes 1 Dislikes 0

I think you're confused...

9 years ago | Likes 1 Dislikes 0

No, I was just sleepily shitposting. My bad.

9 years ago | Likes 1 Dislikes 0

Why hot glue and not KRAGLE?

9 years ago | Likes 1 Dislikes 0

Kragle leaks out the sides and won't come off, makes it look bad.

9 years ago | Likes 1 Dislikes 0

Of all the things they done with the Pi in recent years, a power switch should have been higher priority.

9 years ago | Likes 2 Dislikes 0

They did make it so that if you short out GPIO3 it boots the pi up, but I agree, a button would be nice

9 years ago | Likes 3 Dislikes 0

I didn't know this and was LITERALLY making an on/off switch. You saved me this trouble. <3

9 years ago | Likes 2 Dislikes 0

Yeah! Then you can write a python program (like above) to make that same button shutdown the pi.

9 years ago | Likes 2 Dislikes 0

Posting your PiNes on Imgur? Bold move.

9 years ago | Likes 54 Dislikes 4

I scrolled past this, then I was like "oh" and had to come back to upvote, well done sir!

9 years ago | Likes 2 Dislikes 0

I'm out of the loop, why is this a bold move?

9 years ago | Likes 21 Dislikes 1

Wow......

9 years ago | Likes 3 Dislikes 1

penis.

9 years ago | Likes 20 Dislikes 3

Don't worry. I didn't get it either...

9 years ago | Likes 7 Dislikes 0

9 years ago | Likes 28 Dislikes 2

Penis

9 years ago | Likes 8 Dislikes 1

You cut a Lego!? How dare you hurt my babies!

9 years ago | Likes 14 Dislikes 0

That ain't the worst of it! Op then proceeds to glue the lego together! These truly are unlawful time...

9 years ago | Likes 9 Dislikes 0

Damn that kragle!

9 years ago | Likes 6 Dislikes 0

We must find the piece of resistance!

9 years ago | Likes 2 Dislikes 0

kraft glue

9 years ago | Likes 2 Dislikes 0