Wanting to test his skills by building a webserver [Cnlohr] decided to also code a Minecraft server which allows him to toggle pins from inside the game. The rows of switches seen above give him direct access to the direction register and I/O pins of one port of the ATmega328.
The server hardware is shown in the image above. It’s hard to tell just from that image, but it’s actually a glass substrate which is [Cnlohr’s] specialty. He uses an ENC424J600 to handle the networking side of things. This chip costs almost twice as much as the microcontroller next to it. But even in single quantities the BOM came in at under $20 for the entire build.
In the video after the break [Cnlohr] and a friend demonstrate the ability for multiple users to log into the Minecraft world. The simulation is fairly bare-bones, but the ability to affect hardware from the game world is more exciting than just pushing 1s and 0s through some twisted pairs.
[via Reddit]
Sweeeeet! ;)
Great stuff, really fun to watch…
Horray for linux!
Hi there, very interresting project, i wanted to do the same with bukkit and the computercraft mod. the mod has a http interface which could send a get request every time you send a redstone signal for example. Ideal for triggering gpios of the raspberry, but the server was to slow on a stock 700mHz raspi. How fast would a 8 bit embedded solution be latency wise?
Regards, Jan
It would be even slower
This is the case. I’ve already built a computercraft interface to the host PC (both input and output) and there is a 0.2 second limit on polling.
For levers it isn’t too noticeable, but for pressure plates and buttons it can be.
I’ve done this too, but add the option of using COSM for ‘cloud storage’. Sending/receiving data to/from COSM is slow (just under 10 seconds). I’m in Vietnam though, so your latency might vary. I added control over a local serial port, which can be read and written faster… but as Dissy pointed out polling is still a limitation.
Still, it’s quite ok for a bit of datalogging, sharing state between physical/virtual devices, and other fun stuff. I already have a voltmeter that can be accessed from within minecraft. Next maybe a big red button?
Anyway, bother me if you want the code (Python). It works, but isn’t very user friendly yet.
It would also not have enough ram… not even close to enough.
Unless he managed to have only a single tiny room, with a “procedural” floor and etc.
I watched again the process to make glass PCB Clnohr’s explained here: http://www.youtube.com/watch?v=Rf5HBLzDGQA
Is it possible to print directly on the flexible copper sheet with the laser printer before gluing it too the glass?
The transfer step could be jumped this way.
I have tried doing this several times, most of the time with low success as the fuser can’t properly fuse the toner to the copper on my printer. BUT you can directly attach the toner transfer page to the copper, then attach the card-and-copper to the glass. This seems to work very well.
I was able to print directly to copper foil using a wax printer, so long as the copper was lightly adhered to some paper first. Toner didn’t work for me either, the copper was too big a heat sink for the toner to fuse.
Wax was ok for 10 mil traces usually… but in the end toner transfer proved more reliable and allowed smaller traces. Also wax didn’t like heated etch baths much :/
Have you thought of adhering the copper+toner to polyimide film? This way you could manufacture your own flexible-PCB, heat resistant enough for soldering (as long as you chose an appropriate adhesive). Good for those times you need to replace an FFC (flat flexible cable), or when weight is a concern.
From OP on reddit, https://github.com/cnlohr/avrcraft is the repo.
If you’d rather have a full minecraft implementation you could use the JSONAPI plugin for bukkit instead. http://alecgorge.com/minecraft/jsonapi/ It’s easy to extend with your own plugin, so adding something for detecting lever changes is possible.
What fun would that be? I’d have to run a full computer to do that… this uses 0.5 watts and is tiny.
That’s a silly question with an obvious answer. A fully functional server, and an interfaced avr. You’re already running a minecraft client, running a server on the same computer is trivial.
To be clear, yes, the project is neat. It would be fun to replicate. Interfacing an avr with bukkit and jsonapi would greatly expand the possibilities.
Reading the other comments, I realize that you’re Cnlohr. Sorry if the previous comment came off rude.
At first i really thought that mc does java, but then…So the thing runs tcp and in the loop has all that is required to answer client’s packets and maintain level data?
Awesome (=
It’s not a full implementation. There’s more info in the readme at https://github.com/cnlohr/avrcraft/blob/master/README.txt
As written it supports more than one player, running around, pulling levers, updating blocks, loading main map chunk, and chat.
I can’t but think to the next step: a virtual world linked to an electronic simulator (think Spice, NI Multisim, etc) where the user travels through electronic components in a circuit as an electron would do, exploring from the inside the inner workings of each part.
Holy fuck, do you realise how awesome this is? We are getting close to having virtual rooms where we can control any countless number of real world things now! Imagine this sort of system connected to second like for something. Still though, minecraft is awesome too, this is great.
Man, I can’t wait for this to be fully implemented and publicly released. Within a few years I think it will be ready!
Now we just need some half decent robots, and we can explore the moon from the privacy of our own minecraft-hovel / man-cave!
Awesome work!
Will this work on Second Life?