Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: SSD1308_128x64_I2C
Dependents: lcd-ssd1306-test DisplayOled1 DisplayOled1 DisplayOledi2c ... more
Revision 0:5a8d4b7cb1f5, committed 2016-08-06
- 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