├── BalanceCar.zip ├── EEPRAM_record.zip ├── LowPower ├── README.md └── sleep.zip /BalanceCar.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChaogeImprove/MyLibraries/503172f5e75467b58e06c03d35e16a0d5ee5c961/BalanceCar.zip -------------------------------------------------------------------------------- /EEPRAM_record.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChaogeImprove/MyLibraries/503172f5e75467b58e06c03d35e16a0d5ee5c961/EEPRAM_record.zip -------------------------------------------------------------------------------- /LowPower: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #define dataPin 2 5 | dht DHT; //创建一个DHT对象 6 | 7 | void setup() { 8 | Serial.begin(9600); 9 | } 10 | void loop() { 11 | Serial.println("正在从传感器获取数据"); 12 | delay(200); 13 | int readData = DHT.read11(dataPin); 14 | 15 | float t = DHT.temperature; 16 | float h = DHT.humidity; 17 | 18 | Serial.print("温度 = "); 19 | Serial.print(t); 20 | Serial.print(" C | "); 21 | 22 | Serial.print("湿度 = "); 23 | Serial.print(h); 24 | Serial.println(" % "); 25 | 26 | delay(200); 27 | Serial.println("Arduino:启动睡眠模式"); 28 | delay(200); 29 | LowPower.idle(SLEEP_8S, ADC_OFF, TIMER2_OFF, TIMER1_OFF, TIMER0_OFF, 30 | SPI_OFF, USART0_OFF, TWI_OFF);//选择要关闭的部分,以及关闭时间 31 | Serial.println("Arduino:结束睡眠!"); 32 | Serial.println(""); 33 | delay(200); 34 | } 35 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MyLibraries 2 | 分享打包的arduino库 3 | -------------------------------------------------------------------------------- /sleep.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChaogeImprove/MyLibraries/503172f5e75467b58e06c03d35e16a0d5ee5c961/sleep.zip --------------------------------------------------------------------------------