Project “Automatic Window Blinds” – Solution from a Problem

Project “Automatic Window Blinds”

Thank God we gladly solved the problem regarding Servos. Now, im not going into detail for the servo because I already mentioned it yesterday. We will be using the SG90 Tower Pro Model than the MG995 Tower Pro.

GitHub Repo Link

https://github.com/Chuuuckie/ProjectArduinoWindow

Change of Codes

 //include the servo library

#include <Servo.h>
Servo servo1;
//Servo servo2;

void setup() 
{

  servo1.attach(8);
  Serial.begin(9600);
  //servo1.write(180);
}

void loop() 
{ 

  int val = analogRead(A0);
  int lightValue;
  unsigned int AnalogValue;
  AnalogValue = analogRead(A0);

  lightValue = map(val, 0, 762, 0, 180);

  delay(15);
  servo1.write(lightValue);
  Serial.println(AnalogValue);
  Serial.println(lightValue);

}

Hardware Update

  • Do not use TowerPro Model MG995. Use SG90 instead, ill be giving more specifics about the models. Since then, the LDR is not necessary for changes. Lets keep the LDR in its way.

Leave a Reply

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