How is "adjustTime(adjustment);" command used ?
I want to send a command to my program ,so an hour or a day is added to timer.
Later those commands will be sent by the press of a button
Is this command ok ? adjustTime(hour()++);
#include <Time.h>
void setup() {
Serial.begin(9600);
Serial.println("sending time to arduino");
setTime(0,0,0,1,1,2000);
}
void loop(){
digitalClockDisplay();
delay(1000);
}
void digitalClockDisplay(){
Serial.print(day());
Serial.print(" ");
Serial.print(hour());
printDigits(minute());
printDigits(second());
Serial.print(" ");
Serial.print(day());
Serial.print(" ");
Serial.print(month());
Serial.print(" ");
Serial.print(year());
Serial.println();
}
void printDigits(int digits){
Serial.print(":");
if(digits < 10)
Serial.print('0');
Serial.print(digits);
}