oled no coger UD

Dependencies:   SSD1308_128x64_I2C

Fork of SSD1306_128x64_I2C by Dai Yokota

Files at this revision

API Documentation at this revision

Comitter:
jk1lot
Date:
Sat Aug 06 07:23:40 2016 +0000
Child:
1:acebf73682c6
Commit message:
1st published version

Changed in this revision

SSD1306.h Show annotated file Show diff for this revision Revisions of this file
SSD1308_128x64_I2C.lib Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SSD1306.h	Sat Aug 06 07:23:40 2016 +0000
@@ -0,0 +1,23 @@
+#ifndef SSD1306_H
+#define SSD1306_H
+
+#include "SSD1308.h"
+
+class SSD1306 : public SSD1308 {
+public:
+    SSD1306(I2C &i, uint8_t add) : SSD1308(i,add),_i2c(i),address(add) {
+        _i2c.start();
+        _i2c.write(address);
+        _i2c.write(COMMAND_MODE); _i2c.write(0x8d); //charge pump enable
+        _i2c.stop();
+        _i2c.start();
+        _i2c.write(address);
+        _i2c.write(COMMAND_MODE); _i2c.write(0x14); //charge pump ON
+        _i2c.stop();
+        setDisplayFlip(false, false);
+    }
+private:
+    I2C& _i2c;
+    uint8_t address;
+};
+#endif
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SSD1308_128x64_I2C.lib	Sat Aug 06 07:23:40 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/wim/code/SSD1308_128x64_I2C/#df92b0c0cb92