Real–Life Redstone Lamp Replica Controlled by a Raspberry Pi

Early in my gameplay in Minecraft I began making redstone contraptions. For those that don’t know Minecraft, you can use resources in the game to make analog electronics. People have extended this feature to build entire working computers all in redstone logic in Minecraft.

Redstone lamp (activated)

I only used redstone to make traps and novel machines, but the strong connection between redstone and electronics led me to imagine extending these machines out into the real world. I figured the easiest thing to make was the Redstone Lamp, pictured to the right. The redstone lamp is a block that will provide light when powered. My real life replica redstone lamp does the same thing. It lights up when a redstone lamp ingame is lit up. Here is a video of how it works:

I’ll describe how I got to a working replica in a few stages.

Software

I am not the best getting started with software projects, so I enlisted the help of Vince who was hanging out a bunch at Hive76. We made a quick prototype with a python Minecraft client called pyCraft, an Arduino, and transistor, and a papercraft redstone lamp. You can see that first success here.

While I worked on the physical stuff, Vince moved away and Kyle Yankanich stepped in to help me finalize some stuff. PyCraft connects to any server as a simple chat client, in our case as the user LAMPBOT. Kyle wrote a plugin for pyCraft that listens for a whisper of “on” or “off” and sets pin 16 on the Raspberry Pi’s GPIO high or low respectively. You can download my fork of pyCraft here with Kyle’s plugin and my shell script to start the client. I set my home server to Offline mode so that I wouldn’t need to purchase another Minecraft account.

Hardware

Redstone lamp replica

For the replica, I did my best to turn pixels into straight lines. I designed a laser-cuttable box in six parts with finger joints on the edges. I used 16 finger joints because the a block is 16 pixels wide. The material is MDF with a zebra wood veneer laminated on top. I laser cut six sides and glued all but one together. I acquired some amber cathedral glass from Warner Stained Glass, cut, and glued it in place with silicone adhesive. The RPi is attached to a MDF board sitting diagonally in the cube. The LEDs were torn from inside a failbot and glued around the RPi to light up the inside as much as possible.

In order to turn the LEDs on and off, we use the signal from the RPi GPIO to control an NPN transistor and turn the lights on and off. There is a fritzing wiring diagram of the electronics here. On the NPN transistor, the Collector is the negative lead from the LEDs, the Base is connected to a 100KΩ resistor and then pin 16, and the Emitter goes to the ground on the LED power supply.

There’s no room for a power regulator, so there are two power sources and ethernet running through a hole in the back.

Ingame Stuff

Ingame redstone

To trigger the lamp, command blocks are used ingame as you can see to the left. When a lever is thrown powering a specific redstone lamp, we also power a command block that sends the server command:
/tell LAMPBOT on
We also send the inverted signal to a different command block that outputs:
/tell LAMPBOT off
This can be used on any server with no mods. You would need a Minecraft account for the lamp so you don’t expose your server to cracked clients. The server this was designed for runs Minecraft 1.6.4 now, but in 1.7.2 the /testforblock command and a clock could also trigger the lamp.

I really hope you take what we have done here and continue to connect your Minecraft creations to the real world. Enjoy!

Hive76 Welcomes Raspberry Pi Developer, Rob Bishop!

Rob Bishop, a developer with the Raspberry Pi Foundation, is going to be taking a short tour of US hackerspaces. We are pleased to announce that Hive76 has been included on that list!

Because we are expecting a very high level of interest in this event, we have decided that our studio space is a little too small to accomodate the number of people we are expecting to attend. Philadelphia’s University of the Arts has  graciously offered up some space for us to meet in. There are only 30 spots available, so act fast; this will sell out. Ticket purchased are limited to 2 per person. You’ll find the link below.

If you’ve been wanting to get a taste of the Raspberry Pi (:P), you will not want to miss this event. The event is free to the public, but space is limited! Rob will have Pi(s) for sale at $35 per board. They are still on back-order from major  distributors, so now is your chance to grab one!

Here is what to expect:

Rob Bishop from the RaspberryPi Foundation is touring popular hackspaces in the US throughout September 2012 with the aim of giving talks and workshops about the RaspberryPi to both the hackspace members and also RaspberryPi users in the local community.

The Raspberry Pi Foundation is a charitable organisation founded with the aim of promoting the study of computer science and related topics, especially at school level. The Foundation is responsible for the design and sales of the popular RaspberryPi single-board computer. You can find out more about the Foundation and the RaspberryPi here.

The event at each hackspace will informally consist of the following;

  • Talk:
    • RaspberryPi: Past, Present & Future – An introduction to the RaspberryPi, including an overview of its history and development, details on the technical specification and an outline of future developments with many cool tech demos along the way. Followed by a Q&A session.
  • Tech Demos:
    • A chance to demonstrate various OS’s and other demos
  • Workshop:
    •  A chance to play with the RaspberryPi hands-on.
  • Show & Tell / Prizes: 
    • An opportunity to display RaspberryPi projects from the community with prizes for notable projects.

The tour will be blogged/vlogged on the RaspberryPi website and we hope to attract RaspberryPi enthusiasts and hackers/makers from across the areas we will be visiting, allowing us to meet and support our community.

Here are the details on where we are meeting and at what time:

University of the Arts, Terra Hall, 5th floor

211 S. Broad Street, Philadelphia, PA 19102

Monday, September 24th, 7:00PM-10:00PM

 

Update: Corrected UArts address