Alarm clock shutter code

I have made something that opens my shutters by turning a servo which then presses a button but i would like the alarm to go off at different times at different days is that possible and if it is how is it done any help would be greatly appreciated :slight_smile: :slight_smile:

this is my current code :
#include <Servo.h>

Servo myservo; // create servo object to control a servo
// a maximum of eight servo objects can be created

int pos = 0; // variable to store the servo position

void setup()
{
myservo.attach(9); // attaches the servo on pin 9 to the servo object
}

void loop()
{

for(pos = 180; pos>=1; pos-=1)
{
myservo.write(pos);
delay(15); //The longer you make this delay the longer the servo will take to go from 180 degrees to 0 degrees
}

delay(40000); //30 second delay

for(pos = 0; pos < 180; pos += 1)
{
myservo.write(pos);
delay(15); //The longer you make this delay the longer the servo will take to go from 0 degrees to 180 degrees
}

delay(8640000);

}
//The longer you make this delay the longer it will take the loop to run again (add your 24hour delay)

enzo

Get rid of the delays. 8640 seconds of doing nothing is poor programming technique.

Weedpharma