Arduino 外接 DS3132 读数为2165/165/165问题解决

发布时间 2023-03-31 16:09:11作者: FBshark

即使SCL/SDA不接线,DS3132也会返回,这个值为2165/165/165

因此问题的来源为接线不牢靠。

接线牢靠的标准:RTC模块(ZS-042)上的PWR灯应该常亮,并且亮度很大(我一开始接线,PWR亮度小,而且闪烁)

RTC 的 SCL 接 Arduino 的 A4, SDA 接 Arduino的A5.

The 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