Project “Automatic Window Blinds” – Debugging and Problems

Project “Automatic Window Blinds”

I think the project is working well. Debugging the codes was very hard for starters, deep digging of research from Servos, reading those datasheets are troublesome. There has been some changes from the Codes.

GitHub Repo Link

Change of Codes

//include the servo library

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

void setup() 


void loop() 

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

  //lightValue = map(val, 10, 630, 0, 180);

  if (AnalogValue <=230)

  else if (AnalogValue <=



Hardware Update

Instead using the SERVO MODEL MG995 to be specific, we will be using the SG90 SERVO, and will be updating the codes after another test-runs tomorrow.

Problems Encountered

Since the Servo Model has a different output, if we set the code servo1.write(180) it does not turn 180 degrees but instead it goes full clockwise/counterclockwise, which is the problem because the servo has no LIMIT for rotating. It is never ending, as for the next SERVO MODEL SG90, based from its datasheet – it will precisely turn to 90 degrees to 180 degrees depending from the mapping of its LDR.

The LDR has no problems at all, but we will still be buying (Non Module LDR) because we are using a MODULATED LDR. Therefore the resistor from the module can be adjusted, so as the flow of the current. Let us see for tomorrow if we will be able to Cope up with proper output.

All details and source references will be accredited after making the Project at GitHub repo.

Leave a Reply

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