ATtiny85 SSD1306 + DHT
学到什么
1.ATtiny85 SSD1306 + DHT显示功能及温度
2.理解arduino中的millis()函数
点击ATtiny85 SSD1306 + DHT开始在线仿真
源代码
/*
Why the heart icon? Because I thought it was cool
and I want to use it in the future with some heartbeat sensor.
I needed to keep it somewhere and it was here. ;)
*/
#include <dht.h>
#include <TinyWireM.h>
#include <Tiny4kOLED.h>
#define DHT22_PIN PB1
const unsigned char img_heart_small[] PROGMEM = {
0x00, 0x00, 0xc0, 0xe0, 0xe0, 0xe0, 0xc0, 0x80, 0x80, 0x80, 0xc0, 0xe0, 0xe0, 0xe0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x1f, 0x0f, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00
};//大心图标
const unsigned char img_heart_big[] PROGMEM = {
0xe0, 0xf0, 0xf8, 0xf8, 0xf8, 0xf8, 0xf0, 0xe0, 0xe0, 0xe0, 0xf0, 0xf8, 0xf8,