CircuitrisAmpere
Published © GPL3+

The Totally Useless But Totally Cool Christmas Box

Surprise your friends with this sweet box!

BeginnerShowcase (no instructions)672
The Totally Useless But Totally Cool Christmas Box

Things used in this project

Hardware components

Arduino Mega 2560
Arduino Mega 2560
×1
Servo Module (Generic)
×1
LED light strip
×1
Breadboard (generic)
Breadboard (generic)
×1
Battery Bank
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Tape, Duct
Tape, Duct

Story

Read more

Schematics

Servo Schematic

Code

Christmas_Box.ino

C/C++
#include <Servo.h>

Servo myservo; 

int angle = 0;

void setup() {
  myservo.attach(9);

}

void loop() {
  for(angle = 0; angle < 90; angle += 1)
{
  myservo.write(angle);
  delay(20);
}
for(angle = 90; angle >= 1; angle -= 1)
{
  myservo.write(angle);
  delay(20);
}
}

Credits

CircuitrisAmpere
0 projects • 0 followers

Comments