Control Servo with Light using Arduino

Control Servo with Light

Hello!
In this Instructable i will teach you how to control a servo using a Photocell.
This is very simple and good for beginners.Control Servo with Light

Step 1: Materials

1 x Photocell
1 x 10k Resistor
1 x Arduino
1x Breadboard
1x Servo
and some jumpers

Step 2: Wiring it up

Wire everything following the schematic below.

Step 3: The Code

Control Servo with Light circuit

The Code is very simple:

#include <Servo.h>

Servo myservo;
int val;

 

Read more: Control Servo with Light using Arduino

Leave a Comment

Your email address will not be published. Required fields are marked *