NanoFramework操作ESP32(一)_基础元器件篇(三十八)_ RTC与DS1302时钟模块

一、操作ESP32自带的RTC

1、代码

  RTCHelper.SetSystemTime(new DateTime(2024,01,28,16,01,00));
  while (true)
  {
      Debug.WriteLine("当前系统时间为: " + DateTime.UtcNow);
      Thread.Sleep(1000);
  }

2、结果

二、ESP32+DS1302时钟模块

1、接线

DS1302 树莓派
VCC 3.3V
GND GND
CLK IO5
DAT IO4
RST IO2

  略,用到再补充。

 

posted @ 2024-01-28 15:43  ꧁执笔小白꧂  阅读(137)  评论(0)    收藏  举报