“RTC DS1307 DS3231库”的版本间的差异

来自YFRobotwiki
跳转至: 导航搜索
(以“ {| border="0" cellpadding="10" width="100%" |- |width="30%" valign="top" align="left"| RTC_DS1307_DS3231库 -- arduino实时时钟库(已支持ESP8266) GITHUB...”为内容创建页面)
 
第42行: 第42行:
 
'''SD类提供了访问SD卡和操作卡中文件和目录的函数。'''
 
'''SD类提供了访问SD卡和操作卡中文件和目录的函数。'''
  
:-[[SD.begin()| begin()]]
+
:-[[RtcDS1307.Begin()| Begin()]]
  
:-[[SD.exists()| exists()]]
+
:-[[RtcDS1307.GetIsRunning()| GetIsRunning()]]
  
:-[[SD.mkdir()| mkdir()]]
+
:-[[RtcDS1307.SetIsRunning()| SetIsRunning()]]
  
:-[[SD.open()| open()]]
+
:-[[RtcDS1307.SetDateTime()| SetDateTime()]]
  
:-[[SD.remove()| remove()]]
+
:-[[RtcDS1307.GetDateTime()| GetDateTime()]]
  
:-[[SD.rmdir()| rmdir()]]
+
:-[[RtcDS1307.SetMemory()| SetMemory()]]
 +
 
 +
:-[[RtcDS1307.GetMemory()| GetMemory()]]
 +
 
 +
:-[[RtcDS1307.SetSquareWavePin()| SetSquareWavePin()]]
  
 
<br><br>
 
<br><br>
第59行: 第63行:
 
'''File类允许读取或写入SD卡上单个文件'''
 
'''File类允许读取或写入SD卡上单个文件'''
  
:-[[File.available()| available()]]
+
:-[[RtcDS3231.Begin()| Begin()]]
 +
 
 +
:-[[RtcDS3231.IsDateTimeValid()| IsDateTimeValid()]]
 +
 
 +
:-[[RtcDS3231.GetIsRunning()| GetIsRunning()]]
 +
 
 +
:-[[RtcDS3231.SetIsRunning()| SetIsRunning()]]
 +
 
 +
:-[[RtcDS3231.SetDateTime()| SetDateTime()]]
 +
 
 +
:-[[RtcDS3231.GetDateTime()| GetDateTime()]]
 +
 
 +
:-[[RtcDS3231.GetTemperature()| GetTemperature]]
 +
 
 +
:-[[RtcDS3231.Enable32kHzPin()| Enable32kHzPin()]]
  
:-[[File.close()| close()]]
+
:-[[RtcDS3231.SetSquareWavePin()| SetSquareWavePin()]]
  
:-[[File.flush()| flush()]]
+
:-[[RtcDS3231.SetSquareWavePinClockFrequency()| SetSquareWavePinClockFrequency()]]
  
:-[[File.peek()| peek()]]
+
:-[[RtcDS3231.SetAlarmOne()| SetAlarmOne()]]
  
:-[[File.position()| position()]]
+
:-[[RtcDS3231.SetAlarmTwo()| SetAlarmTwo()]]
  
:-[[File.print()| print]]
+
:-[[RtcDS3231.GetAlarmOne()| GetAlarmOne()]]
  
:-[[File.println()| println()]]
+
:-[[RtcDS3231.GetAlarmTwo()| GetAlarmTwo()]]
  
:-[[File.seek()| seek()]]
+
:-[[RtcDS3231.LatchAlarmsTriggeredFlags()| LatchAlarmsTriggeredFlags()]]
  
:-[[File.size()| size()]]
+
:-[[RtcDS3231.ForceTemperatureCompensationUpdate()| ForceTemperatureCompensationUpdate()]]
  
:-[[File.read()| read()]]
+
:-[[RtcDS3231.GetAgingOffset()| GetAgingOffset()]]
  
:-[[File.write()| write()]]
+
:-[[RtcDS3231.SetAgingOffset()| SetAgingOffset()]]
  
:-[[File.isDirectory()| isDirectory()]]
+
:-[[RtcDS3231.getReg()| getReg()]]
  
:-[[File.openNextFile()| openNextFile()]]
+
:-[[RtcDS3231.setReg()| setReg()]]
  
:-[[File.rewindDirectory()| rewindDirectory()]]
 
  
 
|width="10%" valign="top" align="left"|
 
|width="10%" valign="top" align="left"|

2016年11月17日 (四) 14:47的版本


RTC_DS1307_DS3231库 -- arduino实时时钟库(已支持ESP8266) GITHUB 工程地址:RTC by Makuna

支持设备

DS1307

Full support including squarewave output pin and memory access -- 全部功能支持,包括方波输出和内存访问

DS3231

Full support including squarewave output pin and alarms. -- 全部功能支持,包括方波输出和闹钟


示例


- DS1307_Memory: This demonstrates how to write and read data from the extended memory of the device. This memory is retained even after the device has lost power./演示如何读写数据从设备的扩展内存。即使设备掉电内存依然保存
- DS1307_Simple: This demonstrates how to set and get the date and time from the device./演示了如何在设备上设置和获取日期和时间
- DS3231_Alarms: This demonstrates how to set the alarms and check when the alarms are triggered. This includes using the squarewave output to trigger an interrupt./演示如何设置闹钟和检查何时触发闹钟。这包含使用方波输出触发一个中断
- DS3231_Simple: This demonstrates how to set and get the date and time from the device./演示如何在设备上设置和获取日期和时间。
- DS3231_StoreIt: This demonstrates how to turn off the Rtc clock so that the onboard battery will last longer./演示如何关闭RTC时钟以保证板载电池能持续更长时间




DS1307

SD类提供了访问SD卡和操作卡中文件和目录的函数。

- Begin()
- GetIsRunning()
- SetIsRunning()
- SetDateTime()
- GetDateTime()
- SetMemory()
- GetMemory()
- SetSquareWavePin()



DS3231

File类允许读取或写入SD卡上单个文件

- Begin()
- IsDateTimeValid()
- GetIsRunning()
- SetIsRunning()
- SetDateTime()
- GetDateTime()
- GetTemperature
- Enable32kHzPin()
- SetSquareWavePin()
- SetSquareWavePinClockFrequency()
- SetAlarmOne()
- SetAlarmTwo()
- GetAlarmOne()
- GetAlarmTwo()
- LatchAlarmsTriggeredFlags()
- ForceTemperatureCompensationUpdate()
- GetAgingOffset()
- SetAgingOffset()
- getReg()
- setReg()





返回Arduino库菜单

返回首页

更多建议和问题欢迎反馈至 YFRobot论坛