Go Down

Topic: Control 2 Servos with a photoresistor (Arduino UNO) (Read 2156 times) previous topic - next topic


Hello there. this is my first post here in this forum and this is my first video that i have made. It demonstrate how to control 2 servos (and a LED too) with a photoresistor. The 2 servos are connected in serial with each other on digital pin # 10.



hello,just now I saw what have you done in the vedio. That's awesome! Recently I'm learning Embedded System,and the project that I want to do is exactly same like this. So I wondered that could you share the code with me pretty please;) I'm greatly appreciated. My e-mail is shirley2162008@hotmail.com


I've been trying to make my servo rotate for a while and stop, but it just keeps rotating either in the 180 direction or 0 direction. the video was exactly what i wanted. Pls can you send me the code :D @ oanadu@uco.edu. thanks a lot in advance


Button push servo code that probably be modified to be operated by a photoresistor.

Code: [Select]

//zoomkat servo button test 7-30-2011

#include <Servo.h>
int button1 = 4; //button pin, connect to ground to move servo
int press1 = 0;
Servo servo1;

void setup()
  pinMode(button1, INPUT);
  digitalWrite(4, HIGH); //enable pullups to make pin high

void loop()
  press1 = digitalRead(button1);
  if (press1 == LOW)
  else {

Google forum search: Use Google Search box in upper right side of this page.
Why I like my 2005 Rio Yellow Honda S2000  https://www.youtube.com/watch?v=pWjMvrkUqX0


great work Im in a servo proyect and I searching another similar proyects to learn

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131