Tengo unas dudas respecto a este codigo:
void setDateDs1307()
{
second = (byte) ((Serial.read() - 48) * 10 + (Serial.read() - 48)); // Uso de (byte) conversión de tipo ASCII y matemáticas para lograr el resultado.
minute = (byte) ((Serial.read() - 48) *10 + (Serial.read() - 48));
hour = (byte) ((Serial.read() - 48) *10 + (Serial.read() - 48));
dayOfWeek = (byte) (Serial.read() - 48);
dayOfMonth = (byte) ((Serial.read() - 48) *10 + (Serial.read() - 48));
month = (byte) ((Serial.read() - 48) *10 + (Serial.read() - 48));
year= (byte) ((Serial.read() - 48) *10 + (Serial.read() - 48));
Wire.beginTransmission(DS1307_I2C_ADDRESS);
I2C_WRITE(zero);
I2C_WRITE(decToBcd(second) & 0x7f); // 0 to bit 7 starts the clock
I2C_WRITE(decToBcd(minute));
I2C_WRITE(decToBcd(hour)); // If you want 12 hour am/pm you need to set
// bit 6 (also need to change readDateDs1307)
I2C_WRITE(decToBcd(dayOfWeek));
I2C_WRITE(decToBcd(dayOfMonth));
I2C_WRITE(decToBcd(month));
I2C_WRITE(decToBcd(year));
Wire.endTransmission();
}
A ver si alguien me lo puede exlicar