Final Project – Interactive Box Array – Jake Brzezicki

21 Dec

ImageImageImageImageImageImage

I designed an interactive space of a system of boxes in a vertical array. I originally wanted to design it so that when a hand or other object came into close proximity to the boxes, then the boxes would move out of the way using servo motors and the tied string. This would have been done by using the lead motion control to track the hand, then when it got close, activate the motors and move the boxes. Unfortunately, I was running low on time so I was only able to make it so the boxes would move from the motors, and I hooked it up to a potentiameter. 

The main process was focused around building a base structure for the boxes to hang from and from where the motors would pull. The wood frame is constructed from 1.5 x 1.5 inch wood rods, and loop screws that the string was fed through. I made it at 4 ft scale, but should have gone smaller, but if was all successful I could imagine it as a large interactive installation somewhere that people would have to walk through it and have some fun. For the movement I just used a basic servo motor code with the arduino and bread board connected to the motors with the potentiometer. Also a counterweight to keep the string taught. The boxes were able to move, not as much as I wanted, but it was a start. It was suggested that I have 2 potentiometers to lessen the load on one so I tried to program that but that didn’t work. Fortunately the 1 potentiometer was able to handle the 5 motors. For future iterations I would try to design the array better, and work of the code, as well as try to incoporate the lead motion aspect.

Code:

#include <Servo.h>

Servo microservo;

Servo microservo2;
Servo microservo3;
Servo microservo4;
Servo microservo5;
Servo microservo6;
int pot = 0;
int pott = 0;
int val;
int vall;

void setup() {
microservo.attach(1); // put your setup code here, to run once:
microservo2.attach(2);
microservo3.attach(3);
microservo4.attach(5);
microservo5.attach(6);
microservo6.attach(7);
}

void loop() {
val = analogRead(pot); // put your main code here, to run repeatedly:
vall = analogRead(pott);
val = map(val, 0, 1023, 0, 179);
vall = map(vall, 0, 1023, 0, 179);
microservo.write(val);
microservo2.write(val);
microservo3.write(val);
microservo4.write(vall);
microservo5.write(vall);
microservo6.write(vall);
delay(5);

}

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com 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