Ignore:
Timestamp:
Mar 28, 2016, 2:09:46 PM (8 years ago)
Author:
ertl-honda
Message:

ライブラリを Arduino IDE 1.7.9 にupdate

File:
1 edited

Legend:

Unmodified
Added
Removed
  • rtos_arduino/trunk/arduino_lib/libraries/RTC/examples/RTC_simple_24H_mode/RTC_simple_24H_mode.ino

    r136 r175  
    22This sketch gives a simple demonstration of how to use RTC library.
    33The code sets date and time using internal structure and then print on serial date and time. Time representation is 24 hour mode
     4
     5NOTE: for M0/M0 pro only you can select the oscillator source for count.
     6If you want to use a low power oscillator use rtc.begin(TIME_H24, LOW_POWER); function.
     7If you want to use a more accurate oscillator use rtc.begin(TIME_H24, HIGH_PRECISION); function.
    48**********************************************************************************************************************************************************/
    59
     
    3438 
    3539 //printing date in format YYYY/MM/DD
    36  Serial.print(rtc.local_date.year+2000); // year
     40 Serial.print(rtc.date.year+2000); // year
    3741 Serial.print('/');
    38  Serial.print(rtc.local_date.month);    // month
     42 Serial.print(rtc.date.month);    // month
    3943 Serial.print('/');
    40  Serial.print(rtc.local_date.day);      // day
     44 Serial.print(rtc.date.day);      // day
    4145 Serial.print(' ');
    4246 
    4347 //printing time
    44  Serial.print(rtc.local_time.hour);    //hour
     48 Serial.print(rtc.time.hour);    //hour
    4549 Serial.print(':');
    46  Serial.print(rtc.local_time.minute);  //minute
     50 Serial.print(rtc.time.minute);  //minute
    4751 Serial.print(':');
    48  Serial.println(rtc.local_time.second);  //second
     52 Serial.println(rtc.time.second);  //second
    4953 
    5054 delay(1000);
Note: See TracChangeset for help on using the changeset viewer.