error?
Dependencies: Adafruit_GFX mbed
Revision 0:7535d2863b20, committed 2015-10-22
- Comitter:
- Bm_Fernando
- Date:
- Thu Oct 22 13:31:45 2015 +0000
- Commit message:
- ERROR?
Changed in this revision
diff -r 000000000000 -r 7535d2863b20 Adafruit_GFX1.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Adafruit_GFX1.lib Thu Oct 22 13:31:45 2015 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/users/nkhorman/code/Adafruit_GFX/#7fb1d4d3525d
diff -r 000000000000 -r 7535d2863b20 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Oct 22 13:31:45 2015 +0000 @@ -0,0 +1,47 @@ +#include "mbed.h" +#include "Adafruit_SSD1306.h" + + // an I2C sub-class that provides a constructed default +class I2CPreInit : public I2C +{ +public: + I2CPreInit(PinName sda, PinName scl) : I2C(sda, scl) + { + frequency(400000); + start(); + }; +}; + +I2C myI2C(p9,p10); +Adafruit_SSD1306_I2c myGUI(myI2C,D13,0x78,64,128); + + + +int main() +{ + + myGUI.begin(); + wait_ms(2000); // 2 s for Logo to be displayed + + + + myGUI.clearDisplay(); + + fillScreen(1); + + wait_ms(2000); + + myGUI.clearDisplay(); + + myGUI.printf("%ux%u OLED Display\r\n", myGUI.width(), myGUI.height()); + myGUI.display(); + +//this will scan the i2c bus and print deviceaddresses to terminal + for (int i=0; i<=254; i=i+2) + { + if (myI2C.write(i, NULL, 0) ==0) printf("I2C device detected at address=%2.2X\n\r", i); + } + + while(1){ } + } +
diff -r 000000000000 -r 7535d2863b20 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Oct 22 13:31:45 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/34e6b704fe68 \ No newline at end of file