For this assignment, we thought of creating waving hands using a two arm linkage. We laser cut an arm with two hands at either side with a hole in the center to accept the bolt to link to the first arm. We utilized the full 360 degree motor mount.

In terms of code, we wanted to be able to isolate the PID controls for each motor since the fluid movement of a “wrist ” is different than that of an “elbow” or “shoulder.” We found where the exercise3.py creates the frequency and damping functions and saw that it loops through a list of winches and assigns the frequency and damping to each from Knob 1 and Knob 2. We created a second set of frequency and damping functions and assigned Knobs 1 and 2 to Winch 1 and Knobs 3 and 4 to Winch 2. That allows us to customize the movement of each arm in the system.

self.frequency = 1.0
self.damping_ratio = 1.0
self.frequency_2 = 1.0
self.damping_ratio_2 = 1.0
self.all_axes = range(1) # index list for updating all motors
self.all_axes_2 = range(1,2)
    return

    def set_freq_damping(self):
        for winch in self.main.winches:
            winch.set_freq_damping(self.all_axes, self.frequency, self.damping_ratio)
        for sim in self.main.sims:
            sim.set_freq_damping(self.all_axes, self.frequency, self.damping_ratio)
        for winch in self.main.winches:
            winch.set_freq_damping(self.all_axes_2, self.frequency_2, self.damping_ratio_2)
        for sim in self.main.sims:
            sim.set_freq_damping(self.all_axes_2, self.frequency_2, self.damping_ratio_2)
        self.main.window.set_status("Freq. 1: %f, damping ratio 1: %f, Freq. 2: %f, damping ratio 2: %f" % (self.frequency, self.damping_ratio, self.frequency_2, self.damping_ratio_2))
        return

We tried to script the movement but we couldn’t figure out where the MIDI pad sends commands for the motors to move. We would have really liked to do this but we couldn’t in the moment.