« Dance Club | Main | Collaborative Project »

Stripping and Exterior Decoration - Bryce Davidson

Initially, I worked on visual aspects of the dance club. I helped spice up the walls of the club with decorative checkered paper, and shared ideas about what could visually be happening in the club. Through this process, I started thinking about the different movement aspects that would be fun to add. Mostly, I was thinking about the different dances that I could simulate with the assistance of the Arduino. I had the idea of using a Servo motor to make one of the action figures do "the sprinkler" on the dance floor. In the end, the motion of the motor that I programmed made more sense for the shirtless action hero on the stripper pole.

I was really happy with how it turned out. It was quite a process building the motor shield, and then learning how to make it move how I wanted it to move. The programming was definitely the biggest challenge, but learning how to interact with it was quite satisfying.

Here is the code for the Servo motor:

// Sweep
// by BARRAGAN

#include

Servo myservo; // create servo object to control a servo
// a maximum of eight servo objects can be created

int pos = 0; // variable to store the servo position

void setup()
{
myservo.attach(9); // attaches the servo on pin 9 to the servo object
}


void loop()
{
for(pos = 0; pos < 90; pos += 1) // goes from 0 degrees to 180 degrees
{ // in steps of 1 degree
myservo.write(pos); // tell servo to go to position in variable 'pos'
delay(20); // waits 15ms for the servo to reach the position
}
for(pos = 180; pos>=1; pos-=1) // goes from 180 degrees to 0 degrees
{
myservo.write(pos); // tell servo to go to position in variable 'pos'
delay(15); // waits 15ms for the servo to reach the position
}
}