Remarks
Ssd1306 | |
---|---|
Status | |
Source code | GitHub |
Datasheet(s) | GitHub |
NuGet package |
The SSD1306 is a display controller used to control small, low resolution, single color OLED displays. OLED displays generate their own light - no backlight is included or required.
SDD1306 displays can be found supporting both I2C and SPI and come in resolutions of 32x128, 64x128, 16x96 and 64x96.
You may find mutlicolor variants, however, the color is achieved by placing one or more color filter over the single color display.
Purchasing
There are a number of breakout board available using these displays. This driver has been tested with the following:
Board are also available from Adafruit.
Code Example
MicroGraphics graphics;
Ssd1306 display;
public override Task Initialize()
{
//CreateSpiDisplay();
CreateI2CDisplay();
graphics = new MicroGraphics(display);
return base.Initialize();
}
void CreateSpiDisplay()
{
Resolver.Log.Info("Create Display with SPI...");
display = new Ssd1306
(
spiBus: Device.CreateSpiBus(),
chipSelectPin: Device.Pins.D02,
dcPin: Device.Pins.D01,
resetPin: Device.Pins.D00,
displayType: Ssd1306.DisplayType.OLED128x64
);
}
void CreateI2CDisplay()
{
Resolver.Log.Info("Create Display with I2C...");
display = new Ssd1306
(
i2cBus: Device.CreateI2cBus(Meadow.Hardware.I2cBusSpeed.FastPlus),
address: 60,
displayType: Ssd1306.DisplayType.OLED128x32
);
}
public override Task Run()
{
graphics.Clear();
graphics.CurrentFont = new Font8x12();
graphics.DrawText(0, 0, "Meadow F7", Meadow.Foundation.Color.White);
graphics.DrawRectangle(5, 14, 30, 10, true);
graphics.Show();
return base.Run();
}
Sample project(s) available on GitHub
Wiring Example
To wire a Ssd1306 to your Meadow board using I2C, connect the following:
Ssd1306 | Meadow Pin |
---|---|
GND | GND |
VCC | 3V3 |
SCL | D08 (SCL Pin) |
SDA | D07 (SDA Pin) |
The OLED displays are available with a SPI or I2C interfaces. Wiring for the I2C interface is as follows:
Syntax
public class Ssd1306 : Ssd130xBase, IGraphicsDisplay, ISpiPeripheral, II2cPeripheral, IDisposable
Constructors
Ssd1306(II2cBus, byte, DisplayType)
Create a new SSD1306 object using the default parameters for
Declaration
public Ssd1306(II2cBus i2cBus, byte address = 60, Ssd130xBase.DisplayType displayType = DisplayType.OLED128x64)
Parameters
Type | Name | Description |
---|---|---|
II2cBus | i2cBus | I2cBus connected to display |
byte | address | Address of the bus on the I2C display. |
Ssd130xBase.DisplayType | displayType | Type of SSD1306 display (default = 128x64 pixel display). |
Remarks
Ssd1306 | |
---|---|
Status | |
Source code | GitHub |
Datasheet(s) | GitHub |
NuGet package |
The SSD1306 is a display controller used to control small, low resolution, single color OLED displays. OLED displays generate their own light - no backlight is included or required.
SDD1306 displays can be found supporting both I2C and SPI and come in resolutions of 32x128, 64x128, 16x96 and 64x96.
You may find mutlicolor variants, however, the color is achieved by placing one or more color filter over the single color display.
Purchasing
There are a number of breakout board available using these displays. This driver has been tested with the following:
Board are also available from Adafruit.
Code Example
MicroGraphics graphics;
Ssd1306 display;
public override Task Initialize()
{
//CreateSpiDisplay();
CreateI2CDisplay();
graphics = new MicroGraphics(display);
return base.Initialize();
}
void CreateSpiDisplay()
{
Resolver.Log.Info("Create Display with SPI...");
display = new Ssd1306
(
spiBus: Device.CreateSpiBus(),
chipSelectPin: Device.Pins.D02,
dcPin: Device.Pins.D01,
resetPin: Device.Pins.D00,
displayType: Ssd1306.DisplayType.OLED128x64
);
}
void CreateI2CDisplay()
{
Resolver.Log.Info("Create Display with I2C...");
display = new Ssd1306
(
i2cBus: Device.CreateI2cBus(Meadow.Hardware.I2cBusSpeed.FastPlus),
address: 60,
displayType: Ssd1306.DisplayType.OLED128x32
);
}
public override Task Run()
{
graphics.Clear();
graphics.CurrentFont = new Font8x12();
graphics.DrawText(0, 0, "Meadow F7", Meadow.Foundation.Color.White);
graphics.DrawRectangle(5, 14, 30, 10, true);
graphics.Show();
return base.Run();
}
Sample project(s) available on GitHub
Wiring Example
To wire a Ssd1306 to your Meadow board using I2C, connect the following:
Ssd1306 | Meadow Pin |
---|---|
GND | GND |
VCC | 3V3 |
SCL | D08 (SCL Pin) |
SDA | D07 (SDA Pin) |
The OLED displays are available with a SPI or I2C interfaces. Wiring for the I2C interface is as follows:
Ssd1306(ISpiBus, IDigitalOutputPort?, IDigitalOutputPort, IDigitalOutputPort, DisplayType)
Create a new Ssd1306 display object
Declaration
public Ssd1306(ISpiBus spiBus, IDigitalOutputPort? chipSelectPort, IDigitalOutputPort dataCommandPort, IDigitalOutputPort resetPort, Ssd130xBase.DisplayType displayType = DisplayType.OLED128x64)
Parameters
Type | Name | Description |
---|---|---|
ISpiBus | spiBus | SPI bus connected to display |
IDigitalOutputPort | chipSelectPort | Chip select output port |
IDigitalOutputPort | dataCommandPort | Data command output port |
IDigitalOutputPort | resetPort | Reset output port |
Ssd130xBase.DisplayType | displayType | Type of SSD1306 display (default = 128x64 pixel display) |
Remarks
Ssd1306 | |
---|---|
Status | |
Source code | GitHub |
Datasheet(s) | GitHub |
NuGet package |
The SSD1306 is a display controller used to control small, low resolution, single color OLED displays. OLED displays generate their own light - no backlight is included or required.
SDD1306 displays can be found supporting both I2C and SPI and come in resolutions of 32x128, 64x128, 16x96 and 64x96.
You may find mutlicolor variants, however, the color is achieved by placing one or more color filter over the single color display.
Purchasing
There are a number of breakout board available using these displays. This driver has been tested with the following:
Board are also available from Adafruit.
Code Example
MicroGraphics graphics;
Ssd1306 display;
public override Task Initialize()
{
//CreateSpiDisplay();
CreateI2CDisplay();
graphics = new MicroGraphics(display);
return base.Initialize();
}
void CreateSpiDisplay()
{
Resolver.Log.Info("Create Display with SPI...");
display = new Ssd1306
(
spiBus: Device.CreateSpiBus(),
chipSelectPin: Device.Pins.D02,
dcPin: Device.Pins.D01,
resetPin: Device.Pins.D00,
displayType: Ssd1306.DisplayType.OLED128x64
);
}
void CreateI2CDisplay()
{
Resolver.Log.Info("Create Display with I2C...");
display = new Ssd1306
(
i2cBus: Device.CreateI2cBus(Meadow.Hardware.I2cBusSpeed.FastPlus),
address: 60,
displayType: Ssd1306.DisplayType.OLED128x32
);
}
public override Task Run()
{
graphics.Clear();
graphics.CurrentFont = new Font8x12();
graphics.DrawText(0, 0, "Meadow F7", Meadow.Foundation.Color.White);
graphics.DrawRectangle(5, 14, 30, 10, true);
graphics.Show();
return base.Run();
}
Sample project(s) available on GitHub
Wiring Example
To wire a Ssd1306 to your Meadow board using I2C, connect the following:
Ssd1306 | Meadow Pin |
---|---|
GND | GND |
VCC | 3V3 |
SCL | D08 (SCL Pin) |
SDA | D07 (SDA Pin) |
The OLED displays are available with a SPI or I2C interfaces. Wiring for the I2C interface is as follows:
Ssd1306(ISpiBus, IPin?, IPin, IPin, DisplayType)
Create a new SSD1306 object
Declaration
public Ssd1306(ISpiBus spiBus, IPin? chipSelectPin, IPin dcPin, IPin resetPin, Ssd130xBase.DisplayType displayType = DisplayType.OLED128x64)
Parameters
Type | Name | Description |
---|---|---|
ISpiBus | spiBus | SPI bus connected to display |
IPin | chipSelectPin | Chip select pin |
IPin | dcPin | Data command pin |
IPin | resetPin | Reset pin |
Ssd130xBase.DisplayType | displayType | Type of SSD1306 display (default = 128x64 pixel display) |
Remarks
Ssd1306 | |
---|---|
Status | |
Source code | GitHub |
Datasheet(s) | GitHub |
NuGet package |
The SSD1306 is a display controller used to control small, low resolution, single color OLED displays. OLED displays generate their own light - no backlight is included or required.
SDD1306 displays can be found supporting both I2C and SPI and come in resolutions of 32x128, 64x128, 16x96 and 64x96.
You may find mutlicolor variants, however, the color is achieved by placing one or more color filter over the single color display.
Purchasing
There are a number of breakout board available using these displays. This driver has been tested with the following:
Board are also available from Adafruit.
Code Example
MicroGraphics graphics;
Ssd1306 display;
public override Task Initialize()
{
//CreateSpiDisplay();
CreateI2CDisplay();
graphics = new MicroGraphics(display);
return base.Initialize();
}
void CreateSpiDisplay()
{
Resolver.Log.Info("Create Display with SPI...");
display = new Ssd1306
(
spiBus: Device.CreateSpiBus(),
chipSelectPin: Device.Pins.D02,
dcPin: Device.Pins.D01,
resetPin: Device.Pins.D00,
displayType: Ssd1306.DisplayType.OLED128x64
);
}
void CreateI2CDisplay()
{
Resolver.Log.Info("Create Display with I2C...");
display = new Ssd1306
(
i2cBus: Device.CreateI2cBus(Meadow.Hardware.I2cBusSpeed.FastPlus),
address: 60,
displayType: Ssd1306.DisplayType.OLED128x32
);
}
public override Task Run()
{
graphics.Clear();
graphics.CurrentFont = new Font8x12();
graphics.DrawText(0, 0, "Meadow F7", Meadow.Foundation.Color.White);
graphics.DrawRectangle(5, 14, 30, 10, true);
graphics.Show();
return base.Run();
}
Sample project(s) available on GitHub
Wiring Example
To wire a Ssd1306 to your Meadow board using I2C, connect the following:
Ssd1306 | Meadow Pin |
---|---|
GND | GND |
VCC | 3V3 |
SCL | D08 (SCL Pin) |
SDA | D07 (SDA Pin) |
The OLED displays are available with a SPI or I2C interfaces. Wiring for the I2C interface is as follows: