关于Arduino中oled的中文显示与文字翻译:
#include // DHT11数字传感器库 dht11 DHT11; // DHT11数字传感器库#define DHT11PIN 4 // Data链接数字针脚4#include “U8glib.h” // OLED库 U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE); // I2C #define word1W 16 //定义第一个汉字的宽度#define word1H 16 //定义第一个汉字的高度#define word2W 16 //定义第二个汉字的宽度#define word2H 16 //定义第二个汉字的高度#define word3W 16 //定义第三个汉字的宽度#define word3H 16 //定义第三个汉字的高度#define word4W 16 //定义第四个汉字的宽度#define word4H 16 //定义第四个汉字的高度#define word5W 16 //定义第五个汉字的宽度#define word5H 16 //定义第五个汉字的高度//第一个汉字的编码“温”static unsigned char word1[] U8G_PROGMEM = {0x00,0x00,0xC4,0x1F,0x48,0x10,0x48,0x10,0xC1,0x1F,0x42,0x10,0x42,0x10,0xC8,0x1F,0x08,0x00,0xE4,0x3F,0x27,0x25,0x24,0x25,0x24,0x25,0x24,0x25,0xF4,0x7F,0x00,0x00};//第二个汉字的编码“湿”static unsigned char word2[] U8G_PROGMEM = {0x00,0x00,0xE4,0x1F,0x28,0x10,0x28,0x10,0xE1,0x1F,0x22,0x10,0x22,0x10,0xE8,0x1F,0x88,0x04,0x84,0x04,0x97,0x24,0xA4,0x14,0xC4,0x0C,0x84,0x04,0xF4,0x7F,0x00,0x00};//第三个汉字的编码“度”static unsigned char word3[] U8G_PROGMEM = {0x80,0x00,0x00,0x01,0xFC,0x7F,0x44,0x04,0x44,0x04,0xFC,0x3F,0x44,0x04,0x44,0x04,0xC4,0x07,0x04,0x00,0xF4,0x0F,0x24,0x08,0x42,0x04,0x82,0x03,0x61,0x0C,0x1C,0x70};//第四个汉字的编码“监”static unsigned char word4[] U8G_PROGMEM = {0x20,0x02,0x24,0x02,0x24,0x3E,0x24,0x02,0x24,0x09,0x24,0x11,0xA4,0x10,0x20,0x00,0x00,0x00,0xFC,0x1F,0x24,0x12,0x24,0x12,0x24,0x12,0x24,0x12,0xFF,0x7F,0x00,0x00};//第五个汉字的编码“测”static unsigned char word5[] U8G_PROGMEM = {0x00,0x20,0xE4,0x23,0x28,0x22,0x28,0x2A,0xA1,0x2A,0xA2,0x2A,0xA2,0x2A,0xA8,0x2A,0xA8,0x2A,0xA4,0x2A,0xA7,0x2A,0x84,0x20,0x44,0x21,0x44,0x22,0x24,0x28,0x10,0x10};
oled的注解:OLED即有机发光二极管,在手机OLED上属于新型产品,被称誉为“梦幻显示器”。
OLED显示技术与传统的LCD显示方式不同,无需背光灯,采用非常薄的有机材料涂层和玻璃基板(或柔性有机基板),当有电流通过时,这些有机材料就会发光。而且OLED显示屏幕可以做得更轻更薄,可视角度更大,并且能够显著的节省耗电量。