Recent changes
Slingshot user guide
tag Guide, user
NFCLamp user guide
tag Guide, user
Homepage
MPL115A2
Compiler Error 42
From the mbed microcontroller Cookbook.  

Embedded Artists OLED Display

A 96x64 pixel white OLED display, as found on the Embedded Artists mbed Baseboard.

Hello World!

main.cpp

// example to test out OLED on mbed + XPresso baseboard, sford, Lerche

#include "mbed.h"
#include "EAOLED.h"

// NOTE: The xpresso board does not provide the data/command signal to the mbed, so I added a wire:
// Connect:
//  PIO2_7 of baseboard mbed socket (empty 2nd hole below mbed pin 21)
// to
//   PIO0_8(p13) of J6 (7th hole down on left side of J6)
// to provide OLED data/command signal

EAOLED oled(p5, p6, p7, p8, p25); // mosi, dnc, sclk, cs, power

int main() {
    oled.cls();
    oled.printf("Hello World!");
    wait(1);
    oled.locate(0,5);
    oled.printf("I'm an OLED!");
    wait(1);
    oled.cls();
    oled.hline(10,50,10,0xFFFFFF);
    oled.locate(0,5);
    oled.printf("Horizontal");
    wait(2);
    oled.cls();
    oled.vline(10,30,63,0xFFFFFF);
    oled.locate(0,5);
    oled.printf("Vertical");
    wait(2);
    oled.cls();
    oled.line(10,10,40,30,0xFFFFFF);
    oled.locate(0,5);
    oled.printf("oblique");
    wait(2);
    oled.cls();
    oled.rect(10,10,30,30,0xFFFFFF);
    oled.rect(50,5,60,25,0xFFFFFF);
    oled.locate(0,5);
    oled.printf("Rectangle");
    wait(2);
    oled.cls();
    oled.fillrect(10,10,30,30,0xFFFFFF);
    oled.locate(0,5);
    oled.printf("Filled");
    wait(2);
    oled.cls();
    oled.circle(10,10,7,0xFFFFFF);
    oled.locate(0,5);
    oled.printf("Circle");
}

Warning

The xpresso board does not provide the data/command signal to the mbed, so I added a wire:

Connect:

  • PIO2_7 of baseboard mbed socket (empty 2nd hole below mbed pin 21) to
  • PIO0_8(p13) of J6 (7th hole down on left side of J6) to provide OLED data/command signal

OLED enable wire

Library

Here is a library to drive the display:

Examples

Reference




calendar Page history
Last modified 03 Oct 2010, by   user Christian Lerche   tag EmbeddedArtists, OLED | 4 comments  

4 comments on Embedded Artists OLED Display:

27 Sep 2010

.

27 Sep 2010

You can download complete schematics on thier site, when you register.

Lerche

27 Sep 2010

.

27 Sep 2010

No, that's quite right. If it were up to me, I would remove them all, and only use those for the peripherals i needed.

Lerche

Please login to post comments.