Digole Serial Display FRDM-KL25Z Test Program Requires pull-ups on the SDA & SCL data lines. Digole Serial modified with extra Stop commands so that it works with the FRDM-KL25Z I2C library functions. Works fine on LPC1768 without extra Stop commands.

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 #include "DigoleSerialDisp.h"
00003 //Digole Serial Display FRDM-KL-25Z 
00004 DigoleSerialDisp myOLED(PTE0, PTE1, 0x27);
00005 DigitalOut myled(LED1);
00006 
00007 int main() {
00008     myOLED.clearScreen();
00009     myOLED.drawFrame(0,0,127,63);
00010     myOLED.setPrintPos(1,1,_TEXT_);
00011     myOLED.println("Hello");
00012     myOLED.setPrintPos(1,2,_TEXT_);
00013     myOLED.println("World");
00014     
00015     while(1) {
00016         wait(1);
00017         myled = 1;
00018         wait(1);
00019         myled = 0;
00020     }
00021 }