Site Navigation

Your Account

Choose Language

Introduction

In this project you will switch the servo on and then make a project to press a button and take a photo! Lets catch these Christmas Elves in action!

Video Overview

  • To start off we're going to hook our Servo up to our Arduino.

  • Once we've done this we'll create another circuit with our LDR/Photocell to catch Elves!

Add Comment

Plug Digital Pin 9 into the Servo's orange line.
  • Plug Digital Pin 9 into the Servo's orange line.

Add Comment

Plug 5V into the Servo's red line.
  • Plug 5V into the Servo's red line.

Add Comment

Plug Ground into the Servo's Black line.
  • Plug Ground into the Servo's Black line.

Add Comment

  • Load this code into your Arduino IDE

  • The servo should start swinging back and forth 180 degrees.

  • Now lets see if we can catch a Christmas Elf in action!

Add Comment

  • Now we're going to create a circuit and write some code that actuates the Servo when a change in light is detected.

Add Comment

Insert 10K Resistor into the Breadboard. Insert 10K Resistor into the Breadboard.
  • Insert 10K Resistor into the Breadboard.

Add Comment

Insert the LDR into Breadboard so that one leg is inline with our resistor.
  • Insert the LDR into Breadboard so that one leg is inline with our resistor.

Add Comment

Connect Ground to the LDR
  • Connect Ground to the LDR

Add Comment

Connect Analogue 0 to the LDR.
  • Connect Analogue 0 to the LDR.

Add Comment

Connect 5V to the 10k Ohm Resistor.
  • Connect 5V to the 10k Ohm Resistor.

  • Can you see the voltage divider we just made?

Add Comment

Connect Digital Pin 9 to the Servo's orange signal pin.
  • Connect Digital Pin 9 to the Servo's orange signal pin.

Add Comment

Connect the Servo to Ground.
  • Connect the Servo to Ground.

Add Comment

Connect the Servo to 5V.
  • Connect the Servo to 5V.

Add Comment

  • Here is my code for turning the servo on when the light is bright.

Add Comment

  • Now lets look at the light switching on and the servo pushing a button and taking a photo on my computer.

Add Comment

Proof that the Elf in our house is up to mischief.
  • Proof that the Elf in our house is up to mischief.

  • We caught him as he turned the light switch on

Add Comment

Finish Line

11 other people completed this guide.

Madeleine Schappi

Member since: 09/27/2017

4,527 Reputation

24 Guides authored

Team

Advent Edit Member of Advent Edit

Community

3 Members

24 Guides authored

One Comment

Ha funny use of a servo!!

ZoeM - Reply

Add Comment

View Statistics:

Past 24 Hours: 0

Past 7 Days: 0

Past 30 Days: 7

All Time: 147