購買的DS1302 RTC(Real Time Clock)
- 提到要注意的是DS1302比較便宜,DS3231比較精準。
- 沒有日光節約時間。
- 沒有strftime(), timelocal(), getdate(), mktime()
- 2012年,Arduino沒提供官方date 、time 的 library()(Arduino1.0.6有Time.h、DS1307RTC.h測試DS1302也可以)
我買到跟playground.arduino.cc接腳不一樣
主要接腳幾設定
VCC--->5V
GND--->GND
CLK--->Pin6
DAT--->Pin7
RST --->Pin8 (RST即CE)
使用Arduino1.0.6>Examples>Time>TineRTC,直接上傳,Tools>Serial Monitor
程式碼每秒於serial port 列印現在時間
測試成功。
沒有留言 :
張貼留言