Christmas Hoovy Box

by TylerW150 in Living > Christmas

192 Views, 0 Favorites, 0 Comments

Christmas Hoovy Box

IMG_0162.JPG

So, you want an easy to make a Christmas gift for a loved one or friend with simple but fine coding? Do you have access to some plie wood, an Arduino Uno, Laser cutter and some LED lights? Well, then you should get to making the Santa Hoovy box! The Santa Hoovy box is cheap and easy to code. And I have brought you a full guide on how to make one!

The Coding

int fsrAnalogPin = 0;

int LEDpin = 13; int LEDpin2 = 12; int LEDpin3 = 10; int fsrReading; int LEDbrightness; int LEDbrightness2; int LEDbrightness3; int ServoPin = 9; int val = 0;

#include

Servo servo;

int angle = 0; void setup(void) { Serial.begin(9600); pinMode(LEDpin, OUTPUT); pinMode(LEDpin2, OUTPUT); pinMode(LEDpin3, OUTPUT); servo.attach(ServoPin); servo.write(0); }

void loop(void) { fsrReading = analogRead(fsrAnalogPin); Serial.print("Analog reading = "); Serial.println(fsrReading); if (fsrReading > 255)

{ Serial.println("Moving");

for (angle = 0; angle < 180; angle++) { servo.write(angle); delay(15); } } LEDbrightness = map(fsrReading, 0, 1023, 0, 255); LEDbrightness2 = map(fsrReading, 0, 1023, 0, 255); LEDbrightness3 = map(fsrReading, 0, 1023, 0, 255);

analogWrite(LEDpin, LEDbrightness); analogWrite(LEDpin2, LEDbrightness2); analogWrite(LEDpin3, LEDbrightness3); delay(100); }

Use an LED to Test the Force Sensor

IMG_0154 (1).JPG

If the light turns on when force is put on the Sensor, then you have copied the code correctly.

Now Wire the Servo to the Breadboard

IMG_0155 (1).JPG

Apply Multiple Lights (preferably Red and Green for a Christmas Themed Look)

IMG_0163.JPG

Lazer Cutting

IMG_0162.JPG

Use a laser cutter to cut a wooden box and Christmas Hoovy(From Team Fortress 2), then put the box together and drill two holes in the box (one on top and one on the backside).

Gluing

IMG_0162 (1).JPG

Glue the servo on top of the Box and glue a piece of rope on the servos motor, the rope goes through the hole on top and is glued to the Hoovy.

Finish Up

IMG_0228.jpg

Put Both of the LED lights through the hole on the back of the box behind the Hoovy.

Now when you push on the force sensor the Hoovy will move up and down in the box with lights turning on behind him.