pyMCU test project looks like a Minecraft mob


Hackaday’s own [Jeremy Cook] has been testing out the pyMCU board and managed to put together an animated block head that looks like it could be a foe in Minecraft. That’s thanks mostly to the block of foam he’s using as a diffuser. The face of the project is a set of LEDs. These, along with the servo motors that move the neck are controlled using Python code which you can glance at after the break (there’s a video demo there too).

We first saw pyMCU early in the year. The PIC 16F1939 offers plenty of IO and acts as a USB connected bridge between your hardware and your Python scripts. Speaking of hardware, the test platform used to be an RC helicopter. [Jeremy] scrapped most of it, but kept the servo motors responsible for the pitch of the rotors. The board makes these connections easy, and the concept makes controlling them even easier. In fact, there’s only about 17 lines of code for the functions that control the servos. The rest is a simple UI built with Tkinter.

# File:

from Tkinter import *
import pymcu    # Import pyMCU module

mb = pymcu.mcuModule()  # Create a new pyMCU class object from first found pyMCU board

class App:

    def __init__(self, master):

        frame = Frame(master)

        self.button = Button(frame, text="QUIT", fg="red", command=frame.quit)

        self.servos_up = Button(frame, text="nod up", command=self.nod_up)

        self.servos_down = Button(frame, text="nod down", command=self.nod_down)

        self.tilt_left = Button(frame, text="tilt left", command=self.tilt_left)

        self.tilt_right = Button(frame, text="tilt right", command=self.tilt_right)

    def nod_up(self):
        print "nod up"

    def nod_down(self):
        print "nod down"

    def tilt_left(self):
        print "tilt left"

    def tilt_right(self):
        print "tilt right"

root = Tk()

app = App(root)



  1. wow hackaday is responsive. wow!

  2. Taylorian says:

    awesome use of a trainer kit for an RC chopper. Never would have thought of using that as legs.

  3. Joejoedancer says:

    FTDI USB to UART chips make me angry!!!!!

  4. ssdjlmnop says:

    creepy bot is creepy

    i was expecting it to walk too…

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

Join 96,557 other followers