#include <DS3231.h>
#include <Wire.h>
#include <U8glib.h>
#include <DHT.h>
#include<EEPROM.h>
DHT dht;
U8GLIB_SH1106_128X64 u8g(U8G_I2C_OPT_NONE);
extern uint8_t SmallFont[];
int q[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
extern unsigned char TinyFont[];
char zidingyi[60] = "Copyright lxm. All rights reserved.";
DS3231 Clock;
bool Century = false, h12 = false, PM;
long ds, dd;
int n = 14, y = 10, r = 1, h = 0, m = 0, s = 0;
int second, minute, hour, date, month, year, temperature;
float humidity, temp;
char a[20];
void ReadDS3231()
{
second = Clock.getSecond();
minute = Clock.getMinute();
hour = Clock.getHour(h12, PM);
date = Clock.getDate();
month = Clock.getMonth(Century);
year = Clock.getYear();
temperature = Clock.getTemperature();
}
int runnian(int i)
{
if ((i % 400 == 0) || ((i % 4 == 0) && (i % 100 != 0)))return 1;
else return 0;
}
void lhy()
{
long s1, s2, d1 = 0, d2 = 0;
蓝牙时钟,自定义倒计时,自定义字符串
最新推荐文章于 2024-08-13 21:59:35 发布