User manual
115 116
13.2 Listing OLED Bibliothek mit Beispiel
Hier der vollständige Code inklusive der Bibliothek für die OLED-Anzeige. Der eigentliche Bibliothekscode ist in
schwarz gedruckt, das Beispiel in Blau. Entsprechende Teile dann in die Beispiele kopieren die dort nur mit „...“
angedeutet sind.
// DE_27 OLED Beispiele - Pixelroutinen
#include <Wire.h> // I2C Bibliothek
#include <avr/pgmspace.h> // Zugriff ins ROM
// Hier ggf Adresse anpassen 78 oder 7A je nach Schalter
#dene i2coledssd (0x7A>>1) // default ist 7A
// -------------------------OLED ----------------------------------------------
// GLO066-D-M2005 -- SSD 1306 driver
// 011110sr s=sa r=rw bei ssd1306 sa = adressbit optional zu setzen
// 0x78
// 0x78 und 0x7A je nach schalter...
//
// *****************************************************************
// RDK 2014 FONT Sets
//
/*******************************************************************************
* *
* This le is generated by BitFontCreator Pro v3.0 *
* by Iseatech Software http://www.iseasoft.com/bfc.htm *
* support@iseatech.com *
* *
* Font name: Arial *
* Font width: 0 (proportional font) *
* Font height: 27 *
* Encode: Unicode *
* *
* Data length: 8 bits *
* Invert bits: No *
* Data format: Big Endian, Row based, Row preferred, Unpacked *
* *
* Create time: 13:31 12-01-2011 *
*******************************************************************************/
const unsigned char fontArial14h_data_tablep[] PROGMEM =
{
/* character 0x0020 (‚ ‚): [width=3, offset= 0x0000 (0) ] */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/* character 0x0021 (‚!‘): [width=2, offset= 0x000E (14) ] */
0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x00, 0x80, 0x00, 0x00, 0x00,
/* character 0x0022 (‚“‘): [width=4, offset= 0x001C (28) ] */
0x00, 0x00, 0x00, 0xA0, 0xA0, 0xA0, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/* character 0x0023 (‚#‘): [width=6, offset= 0x002A (42) ] */
0x00, 0x00, 0x00, 0x28, 0x28, 0xF8, 0x50, 0x50,
0xF8, 0xA0, 0xA0, 0x00, 0x00, 0x00,
/* character 0x0024 (‚$‘): [width=6, offset= 0x0038 (56) ] */
0x00, 0x00, 0x00, 0x70, 0xA8, 0xA0, 0x70, 0x28,
0x28, 0xA8, 0x70, 0x20, 0x00, 0x00,
/* character 0x0025 (‚%‘): [width=10, offset= 0x0046 (70) ] */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, 0x00,
0x94, 0x00, 0x94, 0x00, 0x68, 0x00, 0x0B, 0x00,
0x14, 0x80, 0x14, 0x80, 0x23, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
/* character 0x0026 (‚&‘): [width=7, offset= 0x0062 (98) ] */
0x00, 0x00, 0x00, 0x30, 0x48, 0x48, 0x30, 0x50,
0x8C, 0x88, 0x74, 0x00, 0x00, 0x00,
/* character 0x0027 (‚‘‘): [width=2, offset= 0x0070 (112) ] */
0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/* character 0x0028 (‚(‚): [width=4, offset= 0x007E (126) ] */
0x00, 0x00, 0x00, 0x20, 0x40, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x40, 0x20, 0x00,
/* character 0x0029 (‚)‘): [width=4, offset= 0x008C (140) ] */
0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x40, 0x80, 0x00,
/* character 0x002A (‚*‘): [width=4, offset= 0x009A (154) ] */
0x00, 0x00, 0x00, 0x40, 0xE0, 0x40, 0xA0, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/* character 0x002B (‚+‘): [width=6, offset= 0x00A8 (168) ] */
0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0xF8,
0x20, 0x20, 0x00, 0x00, 0x00, 0x00,
/* character 0x002C (‚,‘): [width=3, offset= 0x00B6 (182) ] */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x40, 0x40, 0x40, 0x00,
/* character 0x002D (‚-‘): [width=4, offset= 0x00C4 (196) ] */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xE0, 0x00, 0x00, 0x00, 0x00, 0x00,
/* character 0x002E (‚.‘): [width=3, offset= 0x00D2 (210) ] */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
/* character 0x002F (‚/‘): [width=3, offset= 0x00E0 (224) ] */
0x00, 0x00, 0x00, 0x20, 0x20, 0x40, 0x40, 0x40,
0x40, 0x80, 0x80, 0x00, 0x00, 0x00,
/* character 0x0030 (‚0‘): [width=6, offset= 0x00EE (238) ] */
0x00, 0x00, 0x00, 0x70, 0x88, 0x88, 0x88, 0x88,










