#include<Servo.h>
int ldr = A0;
int servco = 6;
Servo servo;
void setup() {
// put your setup code here, to run once:
servo.attach(servco);
pinMode(servco, OUTPUT);
pinMode(ldr, INPUT);
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
int ldro = analogRead(ldr);
Serial.print(" amount of light: ");
Serial.println(ldro);
int newkattie = map(ldro, 0, 600, 0, 180);
servo.write(newkattie);
}