02-01-2018, 10:42
Może ktoś pomoże jak wprowadzić te zmienne do DS3231 z przykładu Jw.
{
if(digitalRead(OK)==LOW) // gdy wcisniemy przycisk
{
t.hour ++;
delay(100);
if(t.hour > 23)
{
t.hour=0;
}
xxxxxxxx........( t.rok, t.miesiac, t.dzien, t.nazwadnia, t.hour, t.min, t.second); // ?????????????
}
if(digitalRead(DOWN)==LOW) // gdy wcisniemy przycisk
{
t.min ++;
delay(100);
if(t.min > 59)
{
t.min=0;
}
xxxxxx......(t.hour, t.min, t.second);
}
if(digitalRead(UP)==LOW) // gdy wcisniemy przycisk
{
t.sec ++;
delay(100);
if(t.second > 59)
{
t.sec=0;
}
xxxxxx......(t.hour, t.min, t.second);
}
{
if(digitalRead(OK)==LOW) // gdy wcisniemy przycisk
{
t.hour ++;
delay(100);
if(t.hour > 23)
{
t.hour=0;
}
xxxxxxxx........( t.rok, t.miesiac, t.dzien, t.nazwadnia, t.hour, t.min, t.second); // ?????????????
}
if(digitalRead(DOWN)==LOW) // gdy wcisniemy przycisk
{
t.min ++;
delay(100);
if(t.min > 59)
{
t.min=0;
}
xxxxxx......(t.hour, t.min, t.second);
}
if(digitalRead(UP)==LOW) // gdy wcisniemy przycisk
{
t.sec ++;
delay(100);
if(t.second > 59)
{
t.sec=0;
}
xxxxxx......(t.hour, t.min, t.second);
}