* AM2321的取温度间隔得大于2s,否则,i2c会不工作了 * SimpleTimer有个bug,会导致两次快速的读温度,现在读温度函数里加了保护 * Blynk有个bug,会导致无法把数据传到服务器 * 现在可以正常工作了

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers glcdfont.h Source File

glcdfont.h

00001 /*********************************************************************
00002 This is a library for our Monochrome OLEDs based on SSD1306 drivers
00003 
00004   Pick one up today in the adafruit shop!
00005   ------> http://www.adafruit.com/category/63_98
00006 
00007 These displays use SPI to communicate, 4 or 5 pins are required to  
00008 interface
00009 
00010 Adafruit invests time and resources providing this open source code, 
00011 please support Adafruit and open-source hardware by purchasing 
00012 products from Adafruit!
00013 
00014 Written by Limor Fried/Ladyada  for Adafruit Industries.  
00015 BSD license, check license.txt for more information
00016 All text above, and the splash screen must be included in any redistribution
00017 *********************************************************************/
00018 
00019 /*
00020  *  Modified by Neal Horman 7/14/2012 for use in LPC1768
00021  */
00022  
00023 #ifndef FONT5X7_H
00024 #define FONT5X7_H
00025 
00026 // standard ascii 5x7 font
00027 
00028 static unsigned char  font[] = {
00029     0x00, 0x00, 0x00, 0x00, 0x00,   
00030     0x3E, 0x5B, 0x4F, 0x5B, 0x3E,     
00031     0x3E, 0x6B, 0x4F, 0x6B, 0x3E,     
00032     0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 
00033     0x18, 0x3C, 0x7E, 0x3C, 0x18, 
00034     0x1C, 0x57, 0x7D, 0x57, 0x1C, 
00035     0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 
00036     0x00, 0x18, 0x3C, 0x18, 0x00, 
00037     0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 
00038     0x00, 0x18, 0x24, 0x18, 0x00, 
00039     0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 
00040     0x30, 0x48, 0x3A, 0x06, 0x0E, 
00041     0x26, 0x29, 0x79, 0x29, 0x26, 
00042     0x40, 0x7F, 0x05, 0x05, 0x07, 
00043     0x40, 0x7F, 0x05, 0x25, 0x3F, 
00044     0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 
00045     0x7F, 0x3E, 0x1C, 0x1C, 0x08, 
00046     0x08, 0x1C, 0x1C, 0x3E, 0x7F, 
00047     0x14, 0x22, 0x7F, 0x22, 0x14, 
00048     0x5F, 0x5F, 0x00, 0x5F, 0x5F, 
00049     0x06, 0x09, 0x7F, 0x01, 0x7F, 
00050     0x00, 0x66, 0x89, 0x95, 0x6A, 
00051     0x60, 0x60, 0x60, 0x60, 0x60, 
00052     0x94, 0xA2, 0xFF, 0xA2, 0x94, 
00053     0x08, 0x04, 0x7E, 0x04, 0x08, 
00054     0x10, 0x20, 0x7E, 0x20, 0x10, 
00055     0x08, 0x08, 0x2A, 0x1C, 0x08, 
00056     0x08, 0x1C, 0x2A, 0x08, 0x08, 
00057     0x1E, 0x10, 0x10, 0x10, 0x10, 
00058     0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 
00059     0x30, 0x38, 0x3E, 0x38, 0x30, 
00060     0x06, 0x0E, 0x3E, 0x0E, 0x06, 
00061     0x00, 0x00, 0x00, 0x00, 0x00, 
00062     0x00, 0x00, 0x5F, 0x00, 0x00, 
00063     0x00, 0x07, 0x00, 0x07, 0x00, 
00064     0x14, 0x7F, 0x14, 0x7F, 0x14, 
00065     0x24, 0x2A, 0x7F, 0x2A, 0x12, 
00066     0x23, 0x13, 0x08, 0x64, 0x62, 
00067     0x36, 0x49, 0x56, 0x20, 0x50, 
00068     0x00, 0x08, 0x07, 0x03, 0x00, 
00069     0x00, 0x1C, 0x22, 0x41, 0x00, 
00070     0x00, 0x41, 0x22, 0x1C, 0x00, 
00071     0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 
00072     0x08, 0x08, 0x3E, 0x08, 0x08, 
00073     0x00, 0x80, 0x70, 0x30, 0x00, 
00074     0x08, 0x08, 0x08, 0x08, 0x08, 
00075     0x00, 0x00, 0x60, 0x60, 0x00, 
00076     0x20, 0x10, 0x08, 0x04, 0x02, 
00077     0x3E, 0x51, 0x49, 0x45, 0x3E, 
00078     0x00, 0x42, 0x7F, 0x40, 0x00, 
00079     0x72, 0x49, 0x49, 0x49, 0x46, 
00080     0x21, 0x41, 0x49, 0x4D, 0x33, 
00081     0x18, 0x14, 0x12, 0x7F, 0x10, 
00082     0x27, 0x45, 0x45, 0x45, 0x39, 
00083     0x3C, 0x4A, 0x49, 0x49, 0x31, 
00084     0x41, 0x21, 0x11, 0x09, 0x07, 
00085     0x36, 0x49, 0x49, 0x49, 0x36, 
00086     0x46, 0x49, 0x49, 0x29, 0x1E, 
00087     0x00, 0x00, 0x14, 0x00, 0x00, 
00088     0x00, 0x40, 0x34, 0x00, 0x00, 
00089     0x00, 0x08, 0x14, 0x22, 0x41, 
00090     0x14, 0x14, 0x14, 0x14, 0x14, 
00091     0x00, 0x41, 0x22, 0x14, 0x08, 
00092     0x02, 0x01, 0x59, 0x09, 0x06, 
00093     0x3E, 0x41, 0x5D, 0x59, 0x4E, 
00094     0x7C, 0x12, 0x11, 0x12, 0x7C, 
00095     0x7F, 0x49, 0x49, 0x49, 0x36, 
00096     0x3E, 0x41, 0x41, 0x41, 0x22, 
00097     0x7F, 0x41, 0x41, 0x41, 0x3E, 
00098     0x7F, 0x49, 0x49, 0x49, 0x41, 
00099     0x7F, 0x09, 0x09, 0x09, 0x01, 
00100     0x3E, 0x41, 0x41, 0x51, 0x73, 
00101     0x7F, 0x08, 0x08, 0x08, 0x7F, 
00102     0x00, 0x41, 0x7F, 0x41, 0x00, 
00103     0x20, 0x40, 0x41, 0x3F, 0x01, 
00104     0x7F, 0x08, 0x14, 0x22, 0x41, 
00105     0x7F, 0x40, 0x40, 0x40, 0x40, 
00106     0x7F, 0x02, 0x1C, 0x02, 0x7F, 
00107     0x7F, 0x04, 0x08, 0x10, 0x7F, 
00108     0x3E, 0x41, 0x41, 0x41, 0x3E, 
00109     0x7F, 0x09, 0x09, 0x09, 0x06, 
00110     0x3E, 0x41, 0x51, 0x21, 0x5E, 
00111     0x7F, 0x09, 0x19, 0x29, 0x46, 
00112     0x26, 0x49, 0x49, 0x49, 0x32, 
00113     0x03, 0x01, 0x7F, 0x01, 0x03, 
00114     0x3F, 0x40, 0x40, 0x40, 0x3F, 
00115     0x1F, 0x20, 0x40, 0x20, 0x1F, 
00116     0x3F, 0x40, 0x38, 0x40, 0x3F, 
00117     0x63, 0x14, 0x08, 0x14, 0x63, 
00118     0x03, 0x04, 0x78, 0x04, 0x03, 
00119     0x61, 0x59, 0x49, 0x4D, 0x43, 
00120     0x00, 0x7F, 0x41, 0x41, 0x41, 
00121     0x02, 0x04, 0x08, 0x10, 0x20, 
00122     0x00, 0x41, 0x41, 0x41, 0x7F, 
00123     0x04, 0x02, 0x01, 0x02, 0x04, 
00124     0x40, 0x40, 0x40, 0x40, 0x40, 
00125     0x00, 0x03, 0x07, 0x08, 0x00, 
00126     0x20, 0x54, 0x54, 0x78, 0x40, 
00127     0x7F, 0x28, 0x44, 0x44, 0x38, 
00128     0x38, 0x44, 0x44, 0x44, 0x28, 
00129     0x38, 0x44, 0x44, 0x28, 0x7F, 
00130     0x38, 0x54, 0x54, 0x54, 0x18, 
00131     0x00, 0x08, 0x7E, 0x09, 0x02, 
00132     0x18, 0xA4, 0xA4, 0x9C, 0x78, 
00133     0x7F, 0x08, 0x04, 0x04, 0x78, 
00134     0x00, 0x44, 0x7D, 0x40, 0x00, 
00135     0x20, 0x40, 0x40, 0x3D, 0x00, 
00136     0x7F, 0x10, 0x28, 0x44, 0x00, 
00137     0x00, 0x41, 0x7F, 0x40, 0x00, 
00138     0x7C, 0x04, 0x78, 0x04, 0x78, 
00139     0x7C, 0x08, 0x04, 0x04, 0x78, 
00140     0x38, 0x44, 0x44, 0x44, 0x38, 
00141     0xFC, 0x18, 0x24, 0x24, 0x18, 
00142     0x18, 0x24, 0x24, 0x18, 0xFC, 
00143     0x7C, 0x08, 0x04, 0x04, 0x08, 
00144     0x48, 0x54, 0x54, 0x54, 0x24, 
00145     0x04, 0x04, 0x3F, 0x44, 0x24, 
00146     0x3C, 0x40, 0x40, 0x20, 0x7C, 
00147     0x1C, 0x20, 0x40, 0x20, 0x1C, 
00148     0x3C, 0x40, 0x30, 0x40, 0x3C, 
00149     0x44, 0x28, 0x10, 0x28, 0x44, 
00150     0x4C, 0x90, 0x90, 0x90, 0x7C, 
00151     0x44, 0x64, 0x54, 0x4C, 0x44, 
00152     0x00, 0x08, 0x36, 0x41, 0x00, 
00153     0x00, 0x00, 0x77, 0x00, 0x00, 
00154     0x00, 0x41, 0x36, 0x08, 0x00, 
00155     0x02, 0x01, 0x02, 0x04, 0x02, 
00156     0x3C, 0x26, 0x23, 0x26, 0x3C, 
00157     0x1E, 0xA1, 0xA1, 0x61, 0x12, 
00158     0x3A, 0x40, 0x40, 0x20, 0x7A, 
00159     0x38, 0x54, 0x54, 0x55, 0x59, 
00160     0x21, 0x55, 0x55, 0x79, 0x41, 
00161     0x21, 0x54, 0x54, 0x78, 0x41, 
00162     0x21, 0x55, 0x54, 0x78, 0x40, 
00163     0x20, 0x54, 0x55, 0x79, 0x40, 
00164     0x0C, 0x1E, 0x52, 0x72, 0x12, 
00165     0x39, 0x55, 0x55, 0x55, 0x59, 
00166     0x39, 0x54, 0x54, 0x54, 0x59, 
00167     0x39, 0x55, 0x54, 0x54, 0x58, 
00168     0x00, 0x00, 0x45, 0x7C, 0x41, 
00169     0x00, 0x02, 0x45, 0x7D, 0x42, 
00170     0x00, 0x01, 0x45, 0x7C, 0x40, 
00171     0xF0, 0x29, 0x24, 0x29, 0xF0, 
00172     0xF0, 0x28, 0x25, 0x28, 0xF0, 
00173     0x7C, 0x54, 0x55, 0x45, 0x00, 
00174     0x20, 0x54, 0x54, 0x7C, 0x54, 
00175     0x7C, 0x0A, 0x09, 0x7F, 0x49, 
00176     0x32, 0x49, 0x49, 0x49, 0x32, 
00177     0x32, 0x48, 0x48, 0x48, 0x32, 
00178     0x32, 0x4A, 0x48, 0x48, 0x30, 
00179     0x3A, 0x41, 0x41, 0x21, 0x7A, 
00180     0x3A, 0x42, 0x40, 0x20, 0x78, 
00181     0x00, 0x9D, 0xA0, 0xA0, 0x7D, 
00182     0x39, 0x44, 0x44, 0x44, 0x39, 
00183     0x3D, 0x40, 0x40, 0x40, 0x3D, 
00184     0x3C, 0x24, 0xFF, 0x24, 0x24, 
00185     0x48, 0x7E, 0x49, 0x43, 0x66, 
00186     0x2B, 0x2F, 0xFC, 0x2F, 0x2B, 
00187     0xFF, 0x09, 0x29, 0xF6, 0x20, 
00188     0xC0, 0x88, 0x7E, 0x09, 0x03, 
00189     0x20, 0x54, 0x54, 0x79, 0x41, 
00190     0x00, 0x00, 0x44, 0x7D, 0x41, 
00191     0x30, 0x48, 0x48, 0x4A, 0x32, 
00192     0x38, 0x40, 0x40, 0x22, 0x7A, 
00193     0x00, 0x7A, 0x0A, 0x0A, 0x72, 
00194     0x7D, 0x0D, 0x19, 0x31, 0x7D, 
00195     0x26, 0x29, 0x29, 0x2F, 0x28, 
00196     0x26, 0x29, 0x29, 0x29, 0x26, 
00197     0x30, 0x48, 0x4D, 0x40, 0x20, 
00198     0x38, 0x08, 0x08, 0x08, 0x08, 
00199     0x08, 0x08, 0x08, 0x08, 0x38, 
00200     0x2F, 0x10, 0xC8, 0xAC, 0xBA, 
00201     0x2F, 0x10, 0x28, 0x34, 0xFA, 
00202     0x00, 0x00, 0x7B, 0x00, 0x00, 
00203     0x08, 0x14, 0x2A, 0x14, 0x22, 
00204     0x22, 0x14, 0x2A, 0x14, 0x08, 
00205     0xAA, 0x00, 0x55, 0x00, 0xAA, 
00206     0xAA, 0x55, 0xAA, 0x55, 0xAA, 
00207     0x00, 0x00, 0x00, 0xFF, 0x00, 
00208     0x10, 0x10, 0x10, 0xFF, 0x00, 
00209     0x14, 0x14, 0x14, 0xFF, 0x00, 
00210     0x10, 0x10, 0xFF, 0x00, 0xFF, 
00211     0x10, 0x10, 0xF0, 0x10, 0xF0, 
00212     0x14, 0x14, 0x14, 0xFC, 0x00, 
00213     0x14, 0x14, 0xF7, 0x00, 0xFF, 
00214     0x00, 0x00, 0xFF, 0x00, 0xFF, 
00215     0x14, 0x14, 0xF4, 0x04, 0xFC, 
00216     0x14, 0x14, 0x17, 0x10, 0x1F, 
00217     0x10, 0x10, 0x1F, 0x10, 0x1F, 
00218     0x14, 0x14, 0x14, 0x1F, 0x00, 
00219     0x10, 0x10, 0x10, 0xF0, 0x00, 
00220     0x00, 0x00, 0x00, 0x1F, 0x10, 
00221     0x10, 0x10, 0x10, 0x1F, 0x10, 
00222     0x10, 0x10, 0x10, 0xF0, 0x10, 
00223     0x00, 0x00, 0x00, 0xFF, 0x10, 
00224     0x10, 0x10, 0x10, 0x10, 0x10, 
00225     0x10, 0x10, 0x10, 0xFF, 0x10, 
00226     0x00, 0x00, 0x00, 0xFF, 0x14, 
00227     0x00, 0x00, 0xFF, 0x00, 0xFF, 
00228     0x00, 0x00, 0x1F, 0x10, 0x17, 
00229     0x00, 0x00, 0xFC, 0x04, 0xF4, 
00230     0x14, 0x14, 0x17, 0x10, 0x17, 
00231     0x14, 0x14, 0xF4, 0x04, 0xF4, 
00232     0x00, 0x00, 0xFF, 0x00, 0xF7, 
00233     0x14, 0x14, 0x14, 0x14, 0x14, 
00234     0x14, 0x14, 0xF7, 0x00, 0xF7, 
00235     0x14, 0x14, 0x14, 0x17, 0x14, 
00236     0x10, 0x10, 0x1F, 0x10, 0x1F, 
00237     0x14, 0x14, 0x14, 0xF4, 0x14, 
00238     0x10, 0x10, 0xF0, 0x10, 0xF0, 
00239     0x00, 0x00, 0x1F, 0x10, 0x1F, 
00240     0x00, 0x00, 0x00, 0x1F, 0x14, 
00241     0x00, 0x00, 0x00, 0xFC, 0x14, 
00242     0x00, 0x00, 0xF0, 0x10, 0xF0, 
00243     0x10, 0x10, 0xFF, 0x10, 0xFF, 
00244     0x14, 0x14, 0x14, 0xFF, 0x14, 
00245     0x10, 0x10, 0x10, 0x1F, 0x00, 
00246     0x00, 0x00, 0x00, 0xF0, 0x10, 
00247     0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
00248     0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 
00249     0xFF, 0xFF, 0xFF, 0x00, 0x00, 
00250     0x00, 0x00, 0x00, 0xFF, 0xFF, 
00251     0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 
00252     0x38, 0x44, 0x44, 0x38, 0x44, 
00253     0x7C, 0x2A, 0x2A, 0x3E, 0x14, 
00254     0x7E, 0x02, 0x02, 0x06, 0x06, 
00255     0x02, 0x7E, 0x02, 0x7E, 0x02, 
00256     0x63, 0x55, 0x49, 0x41, 0x63, 
00257     0x38, 0x44, 0x44, 0x3C, 0x04, 
00258     0x40, 0x7E, 0x20, 0x1E, 0x20, 
00259     0x06, 0x02, 0x7E, 0x02, 0x02, 
00260     0x99, 0xA5, 0xE7, 0xA5, 0x99, 
00261     0x1C, 0x2A, 0x49, 0x2A, 0x1C, 
00262     0x4C, 0x72, 0x01, 0x72, 0x4C, 
00263     0x30, 0x4A, 0x4D, 0x4D, 0x30, 
00264     0x30, 0x48, 0x78, 0x48, 0x30, 
00265     0xBC, 0x62, 0x5A, 0x46, 0x3D, 
00266     0x3E, 0x49, 0x49, 0x49, 0x00, 
00267     0x7E, 0x01, 0x01, 0x01, 0x7E, 
00268     0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 
00269     0x44, 0x44, 0x5F, 0x44, 0x44, 
00270     0x40, 0x51, 0x4A, 0x44, 0x40, 
00271     0x40, 0x44, 0x4A, 0x51, 0x40, 
00272     0x00, 0x00, 0xFF, 0x01, 0x03, 
00273     0xE0, 0x80, 0xFF, 0x00, 0x00, 
00274     0x08, 0x08, 0x6B, 0x6B, 0x08,
00275     0x36, 0x12, 0x36, 0x24, 0x36, 
00276     0x06, 0x0F, 0x09, 0x0F, 0x06, 
00277     0x00, 0x00, 0x18, 0x18, 0x00, 
00278     0x00, 0x00, 0x10, 0x10, 0x00, 
00279     0x30, 0x40, 0xFF, 0x01, 0x01, 
00280     0x00, 0x1F, 0x01, 0x01, 0x1E, 
00281     0x00, 0x19, 0x1D, 0x17, 0x12, 
00282     0x00, 0x3C, 0x3C, 0x3C, 0x3C, 
00283     0x00, 0x00, 0x00, 0x00, 0x00, 
00284 };
00285 #endif