ok I am putting this together and I have to make it work if I can!
Please look over and compile code if you can!
I am using an Arduino mega 2560, dht22, rtc ds3231, I have LCD on order Geekcreit® IIC / I2C 1602 Blue Backlight LCD Display Module For Arduino, Relay shield v3.0.
Please look over error list and please get back at me please!
Please read the first post in any forum entitled how to use this forum. http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.
Thanks.. Tom...
PS Sorry your code may be too big to use code tags.
Quite a lot of your code is not in a function. For instance this block, but there are others
Wire.begin();
RTC.begin();
lcd.begin(16, 2); // Configura lcd numero columnas y filas
lcd.setCursor(0, 0); //Show "TIME" on the LCD
lcd.print("TIME");
lcd.setCursor(0, 1);
lcd.print("ON"); //Show "ON" on the lcd
lcd.setCursor(6, 1);
lcd.print("OFF"); //Show "OFF" on the lcd