I have made a program to open my shutters in the morning is there a way i can also make it display the time on a lcd module here is the code below any help will be really appreciated
#include <Wire.h>
#include <Time.h>
#include <DS1307RTC.h>
#include <Servo.h>
Servo myservo;
int pos = 0;
void setup()
{
Serial.begin(9600);
while (!Serial) ; // wait for serial
delay(200);
Serial.println("DS1307RTC Read Test");
Serial.println("-------------------");
myservo.attach(9);
myservo.write(0);
}
void loop()
{
tmElements_t tm;
if (RTC.read(tm))
{
Serial.print("Ok, Time = ");
print2digits(tm.Hour);
Serial.write(':');
print2digits(tm.Minute);
Serial.write(':');
print2digits(tm.Second);
Serial.print(", Date (D/M/Y) = ");
Serial.print(tm.Day);
Serial.write('/');
Serial.print(tm.Month);
Serial.write('/');
Serial.print(tmYearToCalendar(tm.Year));
Serial.println();
if((tm.Hour==14)&&(tm.Minute==10)&&(tm.Second==00))
{
myservo.write(180);
for(int i=0 ;i<30 ;i++)
{
delay(1000);
}
myservo.write(0);
}
}
else
{
if (RTC.chipPresent())
{