# 1 "/Users/nico/Documents/GitHub/blinds-controller/blinds-controller.ino"
# 2 "/Users/nico/Documents/GitHub/blinds-controller/blinds-controller.ino" 2

Servo blind;

int position = 0;
int photoDiode = A0;
int pdValue = 0;

void setup()
{
    blind.attach(9);
}

void openBlind()
{
    for(position = 0; position <= 180; position += 1){
        blind.write(position);
        delay(15);
    }
}

void closeBlind(){
    for(position = 180; position >= 0; position -= 1){
        blind.write(position);
        delay(15);
    }
}

void loop()
{
    pdValue = analogRead(photoDiode);

}
