c++ - 这个Arduino sleep setAlarm函数的周长是多少?

标签 c++ arduino

RTC.setAlarm(ALM1_MATCH_HOURS, 33, 18, 0); //set your wake-up time here
是33秒18分钟零小时吗?

自述文件引用了它的Adafruit库。从那里,我找不到实际在哪里说setAlarm的参数。

  • adafruit.github.io/RTClib
  • adafruit.github.io/RTClib/html/class_r_t_c___d_s3231.html
  • github.com/adafruit/RTClib

  • 库(在草图中)如下:
    #include <Wire.h>
    #include <RTClibExtended.h>
    #include <LowPower.h>
    

    最佳答案

    看起来它也来自另一个库。我只是搜索了代码本身,发现了这个:https://github.com/JChristensen/DS3232RTC#alarm-methods

      RTC.setAlarm(ALM1_MATCH_SECONDS, 30, 00, 0, 0);   //set your wake-up time here:
      RTC.setAlarm(ALM2_MATCH_MINUTES, 0, 10, 0, 0);  //where "xx" is minutes
      // every 00 minutes past the hour;
      // if every minute is needed change MINUTES to SECONDS (only for ALM1)
      // matches seconds AND minutes when _MINUTES is used. Sequence of time:
      // first seconds, then minutes, hours, daydate
      // or: seconds (but enter 00, is ignored), minutes then hours, daydate for ALM2
      // zero's mean: always
      // example: Set alarm1 every day at 18:33
      // RTC.setAlarm(ALM1_MATCH_HOURS, 33, 18, 0);  set your wake-up time here
      // RTC.alarmInterrupt(1, true);
    

    因此,闹钟每天设置为18:33。
    RTC.setAlarm(ALM1_MATCH_HOURS, [minute], [hour], 0);

    关于c++ - 这个Arduino sleep setAlarm函数的周长是多少?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61937417/

    相关文章:

    在 Windows 机器上用 C 语言与 Arduino 芯片通信

    c++ - atmega328P+ENC28J60运行12小时卡死

    integer - 在 Arduino 中串行发送一个整数

    c# - 树莓派 2 和 BMP280 : Slave address was not acknowledged

    c++ - 在两行之间检测 visual studio c++ 中的内存泄漏

    c++ - 在类函数中重载 "+="时使用 "+"?

    c++ - 嵌套类崩溃 C++

    c++ - Windows 上的 gcc 调试日志文件?

    c++ - 控件如何放置在标题栏中?

    audio - 如何从Arduino的FM调谐器屏蔽获取音频或如何获取音频