#include <Arduino.h>
#line 1 "/Users/nico/Documents/GitHub/blinds-controller/blinds-controller.ino"
#include <Servo.h>

Servo blind;

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

#line 9 "/Users/nico/Documents/GitHub/blinds-controller/blinds-controller.ino"
void setup();
#line 14 "/Users/nico/Documents/GitHub/blinds-controller/blinds-controller.ino"
void openBlind();
#line 22 "/Users/nico/Documents/GitHub/blinds-controller/blinds-controller.ino"
void closeBlind();
#line 29 "/Users/nico/Documents/GitHub/blinds-controller/blinds-controller.ino"
void loop();
#line 9 "/Users/nico/Documents/GitHub/blinds-controller/blinds-controller.ino"
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);

}

