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

Committer:
PhilG1300
Date:
Sat Jun 22 09:33:42 2013 +0000
Revision:
0:535e018f97b9
Digole Serial Display FRDM-KL25Z I2C Test Program

Who changed what in which revision?

UserRevisionLine numberNew contents of line
PhilG1300 0:535e018f97b9 1 #include "mbed.h"
PhilG1300 0:535e018f97b9 2 #include "DigoleSerialDisp.h"
PhilG1300 0:535e018f97b9 3 //Digole Serial Display FRDM-KL-25Z
PhilG1300 0:535e018f97b9 4 DigoleSerialDisp myOLED(PTE0, PTE1, 0x27);
PhilG1300 0:535e018f97b9 5 DigitalOut myled(LED1);
PhilG1300 0:535e018f97b9 6
PhilG1300 0:535e018f97b9 7 int main() {
PhilG1300 0:535e018f97b9 8 myOLED.clearScreen();
PhilG1300 0:535e018f97b9 9 myOLED.drawFrame(0,0,127,63);
PhilG1300 0:535e018f97b9 10 myOLED.setPrintPos(1,1,_TEXT_);
PhilG1300 0:535e018f97b9 11 myOLED.println("Hello");
PhilG1300 0:535e018f97b9 12 myOLED.setPrintPos(1,2,_TEXT_);
PhilG1300 0:535e018f97b9 13 myOLED.println("World");
PhilG1300 0:535e018f97b9 14
PhilG1300 0:535e018f97b9 15 while(1) {
PhilG1300 0:535e018f97b9 16 wait(1);
PhilG1300 0:535e018f97b9 17 myled = 1;
PhilG1300 0:535e018f97b9 18 wait(1);
PhilG1300 0:535e018f97b9 19 myled = 0;
PhilG1300 0:535e018f97b9 20 }
PhilG1300 0:535e018f97b9 21 }