即使SCL/SDA不接线,DS3132也会返回,这个值为2165/165/165
因此问题的来源为接线不牢靠。
接线牢靠的标准:RTC模块(ZS-042)上的PWR灯应该常亮,并且亮度很大(我一开始接线,PWR亮度小,而且闪烁)
RTC 的 SCL 接 Arduino 的 A4, SDA 接 Arduino的A5.
标签:begin,RTC,Arduino,接线,DS3132,165 From: https://www.cnblogs.com/FBsharl/p/17276573.htmlThe 165 indicates that the data line for the RTC (SDA) is stuck at one which usually indicates a wiring error. I notice in the photos that you do not have one or two of the jumper wire's pins pushed all the way into the header so that they may not be making good contact.
There is one small difference in the two sketches as far as the RTC is concerned. In the datalogger code, you call Wire.begin() in setup() but in the standalone RTC code you don't. I would have thought that the standalone RTC sketch would have failed without the wire.begin(). Anyway, try removing the Wire.begin() from the datalogger.
Pete