Reusable Body Parts

Description

Clint Rutkas

 

What screams Halloween more than fake body parts? Fake body parts that twitch and are covered with blood. The second thing that screams Halloween is causing some mischief.

 

Black cats of Hardware

I got to say, I love Phidgets. They are relatively inexpensive USB items that power motors and have a great API with tons of examples. My only issue I have is I follow what my teachers and mother told me far too much to the letter. I attempted to reuse and modify what I had instead of buying what I need to get the job done. After buying three separate items, I finally got the correct item for this task. I got a PhidgetMotorControl LV.

 

 

 

The failed purchase and why.

Attempt 1: The PhidgetTextLCD 8/8/8

Why did this Phidget fail to work for this application? It couldn't provide enough power to the motor. The hand moved far more like something caught in a black hole than anything remotely scary.

Attempt 2: The Phidget Servo 4-Motor

My attempt to piggy back on top of a Servo control failed pretty badly. I forgot an important thing with servos which is they are always on. I got this initially for a different project and figured I could modify it to fit my need.

Mod the hand with internal water cooling!

Wait, no, I didn't do that, but it would be cooler if I did. Getting the hand to work with the Phidget was rather easy. I soldered some extension wires into the battery pack and then hooked it into the Phidget.

Black cats of Hardware

This is a relatively easy program. Due to Phidget's awesome and easy to use API, I had the program up and working in a matter of minutes. I spent more time messing around with the layout and finding a cool background than I did typing.

 

The entire application, in a c# power cord.

public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        MotorControl motor;
        
        private const string btnMoveStart = "Force Start Movement";
        private const string btnMoveEnd = "Force Stop Movement";

        private void Form1_Load(object sender, EventArgs e)
        {
            motor = new MotorControl();
            Servo_Detach(null, null);
            
            motor.Attach += new AttachEventHandler(Servo_Attach);
            motor.Detach += new DetachEventHandler(Servo_Detach);
            
            btnMove.Text = btnMoveStart;
            
            motor.open();
        }

        void Servo_Detach(object sender, DetachEventArgs e)
        {
            btnMove.Enabled = false;
            txtStatus.Text = "NOT CONNECTED";
            txtStatus.ForeColor = Color.Red;
        }
        private void Servo_Attach(object sender, AttachEventArgs e)
        {
            btnMove.Enabled = true;
            txtStatus.Text = "CONNECTED";
            txtStatus.ForeColor = Color.Green;
        }

        private void btnMove_Click(object sender, EventArgs e)
        {
            if (btnMove.Text == btnMoveStart)
            {
                btnMove.Text = btnMoveEnd;
                motor.motors[1].Velocity = 75;
            }
            else
            {
                btnMove.Text = btnMoveStart;
                motor.motors[1].Velocity = 0;
            }
        }

        private void Form1_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (motor.Attached)
                motor.close();
        }
    }

 

Now in a Visual Basic chord

Public Class Form1
    Inherits Form

    Private motor As MotorControl

    Private Const btnMoveStart As String = "Force Start Movement"

    Private Const btnMoveEnd As String = "Force Stop Movement"

    Public Sub New()
        MyBase.New()
        InitializeComponent()
    End Sub

    Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
        motor = New MotorControl
        Me.Servo_Detach(Nothing, Nothing)
        AddHandler motor.Attach, AddressOf Me.Servo_Attach
        AddHandler motor.Detach, AddressOf Me.Servo_Detach
        btnMove.Text = btnMoveStart
        motor.open()
    End Sub

    Private Sub Servo_Detach(ByVal sender As Object, ByVal e As DetachEventArgs)
        btnMove.Enabled = False
        txtStatus.Text = "NOT CONNECTED"
        txtStatus.ForeColor = Color.Red
    End Sub

    Private Sub Servo_Attach(ByVal sender As Object, ByVal e As AttachEventArgs)
        btnMove.Enabled = True
        txtStatus.Text = "CONNECTED"
        txtStatus.ForeColor = Color.Green
    End Sub

    Private Sub btnMove_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnMove.Click
        If (btnMove.Text = btnMoveStart) Then
            btnMove.Text = btnMoveEnd
            motor.motors(1).Velocity = 75
        Else
            btnMove.Text = btnMoveStart
            motor.motors(1).Velocity = 0
        End If
    End Sub

    Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As FormClosingEventArgs) Handles MyBase.FormClosing
        If motor.Attached Then
            motor.close()
        End If
    End Sub
End Class

 

 

 

Let the hunt begin for prank monkeys

Here is one of my favorite victims, Chris King, to prank.

 

Conclusion

Hacking hardware is easy if you buy the right toys. What can be done to make this better and cooler? I could add in an IR sensor with the 8/8/8 and use that to detect if people are near the hand.

 

Author bio: Clint is an application developer for SpringCM, an on-demand, web-based document and content management system. As a developer, Clint is part of an innovative team committed to supporting affordable, scalable and reliable enterprise content management. His two primary development languages are C# and JavaScript. Prior to the Halloween Dead Hand project, he worked on his Disco Dance Floor. In his off time, he whips up other random weird projects and does twenty something activities with his friends. Clint's blog is betterthaneveryone.com and can be emailed at clint@rutkas.com.

Tags:

Halloween, events

The Discussion

  • User profile image
    sindy lou hoo

    this is disgusting and u need some rell ones to spice it up, i may be a lady but i enjoy them

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to send us feedback you can Contact Us.