EL0443 DISPLAY OLED 0,96" BLANCO IIC I2C Módulo 128x64
Módulo de 0.96" pulgadas I2C IIC 128X64 OLED LCD Blanco
Descripción:
- Tamaño pantalla: 0.96 pulgadas
- Resolucion: 128X64
- Color: Blanco
- Angulo de visión: mayor de 160º
- Compatible: arduino, 51 series, MSP430 series, STIM32 / 2, SCR chips
- Consumo bajo: 0.04W en funcionamiento normal
- Alimentación: 3.3V-5V DC
- Dimensiones: 27mm x 27mm x 4.1mm
- Driver IC: SSD1306
- Communicacion: IIC, utiliza solo dos puertos I/O
- Backlight: OLED self light, no backlight
Conexiones:
- VCC: 3.3-5V
- GND: Ground
- SCL: Serial Clock
- SDA: Serial Data
Esta pantalla se inicializa con el comando:
U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE|U8G_I2C_OPT_DEV_0);
Ejemplo de Código para esta pantalla:
// Programa: Ejemplo OLED
// Autor: Electrrio
#include "U8glib.h"
//U8GLIB_ST7920_192X32_4X u8g(10); // SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10, HW SPI
//U8GLIB_ST7920_202X32_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
//U8GLIB_ST7920_202X32_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
//U8GLIB_ST7920_202X32_1X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
//U8GLIB_DOGXL160_2X_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
//U8GLIB_PCD8544 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
//U8GLIB_PCF8812 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
//U8GLIB_ILI9325D_320x240 u8g(18,17,19,U8G_PIN_NONE,16 ); // 8Bit Com: D0..D7: 0,1,2,3,4,5,6,7 en=wr=18, cs=17, rs=19, rd=U8G_PIN_NONE, reset = 16
//U8GLIB_SBN1661_122X32 u8g(8,9,10,11,4,5,6,7,14,15, 17, U8G_PIN_NONE, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 cs1=14, cs2=15,di=17,rw=16,reset = 16
//U8GLIB_SSD1306_128X64 u8g(10, 9); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
//U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_DEV_0|U8G_I2C_OPT_NO_ACK|U8G_I2C_OPT_FAST); // Fast I2C / TWI
//U8GLIB_SSD1306_128X64_2X u8g(U8G_I2C_OPT_NONE);
//U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NO_ACK); // Display which does not send AC
U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE|U8G_I2C_OPT_DEV_0); // I2C / TWI
void draw()
{
u8g.setFont(u8g_font_profont17);
u8g.drawStr(3, 15, "Electrrio");
u8g.setFont(u8g_font_profont15);
u8g.drawStr(2, 37, "La Compra + Segura");
u8g.drawStr(2, 57, "www.electrrio.com");
}
void setup(void)
{
Serial.begin(9600);
if ( u8g.getMode() == U8G_MODE_R3G3B2 ) {
u8g.setColorIndex(255); // Blanco
}
else if ( u8g.getMode() == U8G_MODE_GRAY2BIT ) {
u8g.setColorIndex(3); // max intensidad
}
else if ( u8g.getMode() == U8G_MODE_BW ) {
u8g.setColorIndex(1); // pixel on
}
else if ( u8g.getMode() == U8G_MODE_HICOLOR ) {
u8g.setHiColorByRGB(255,255,255);
}
}
void loop(void)
{
u8g.firstPage();
do
{
draw();
} while( u8g.nextPage() );
delay(50);
}