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.
Revision 0:160d9ed96c23, committed 2016-12-19
- Comitter:
- Anaesthetix
- Date:
- Mon Dec 19 15:05:35 2016 +0000
- Child:
- 1:fee9be359627
- Commit message:
- -
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SSH1106.lib Mon Dec 19 15:05:35 2016 +0000 @@ -0,0 +1,1 @@ +https://developer.mbed.org/users/Anaesthetix/code/SSH1106/#3cd0a11a2f91
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Mon Dec 19 15:05:35 2016 +0000
@@ -0,0 +1,45 @@
+// -- Example program for the SSH1106 library - written for LPC1768
+// -- Tested with a 1.3" 128x64 OLED LCD
+
+#include "mbed.h"
+#include "SSH1106.h"
+
+SPI lcd(p11, NC, p13); // mosi, miso (nc), sclk
+DigitalOut cs(p15); // chip select (active low)
+DigitalOut cd(p14); // command/data (0=command, 1=data)
+DigitalOut rst(p16); // Reset (active low)
+
+SSH1106 ssh1106(lcd, cs, cd, rst);
+
+int main()
+{
+ ssh1106.init();
+ wait(1);
+ ssh1106.clear();
+ wait(1);
+ char str[40];
+ int n = 6;
+ n = sprintf(str, "01234ABCdefghijk");
+ while(1) {
+ ssh1106.drawBitmap(test);
+ wait(1);
+ ssh1106.drawBitmap(einstein);
+ wait(1);
+ ssh1106.drawBitmap(biohazard);
+ wait(1);
+ ssh1106.drawBitmap(highvoltage);
+ wait(1);
+ ssh1106.drawBitmap(copter);
+ wait(1);
+ ssh1106.clear();
+ ssh1106.writeText(0,0, font_6x6, str, n);
+ ssh1106.writeText(0,1, font_7x7, str, n);
+ ssh1106.writeText(0,2, bold_font, str, n);
+ ssh1106.writeText(0,3, font_5x8, str, n);
+ ssh1106.writeText2d(0,4, font2d_hunter, str, n);
+ ssh1106.writeText(0,5, font_8x8_1, str, n);
+ ssh1106.writeText2d(0,6, font2d_formplex12, str, n);
+ ssh1106.writeText(0,7, font_4x5, str, n);
+ wait(5);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon Dec 19 15:05:35 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/faff56e089b2 \ No newline at end of file