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: Adafruit_FeatherOLED USBDevice max32630fthr pms1003
Fork of FTHR_OLED by
Revision 10:1f5e78dd4a7c, committed 2017-02-08
- Comitter:
- switches
- Date:
- Wed Feb 08 00:50:27 2017 +0000
- Parent:
- 9:ecdad18f61c2
- Child:
- 11:c8affbb017b2
- Commit message:
- Moved declaration into main and added delay to ensure display is ready to be initialized.
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Wed Feb 08 00:14:26 2017 +0000
+++ b/main.cpp Wed Feb 08 00:50:27 2017 +0000
@@ -39,8 +39,6 @@
I2C i2c(P3_4, P3_5); // SDA, SCL
-Adafruit_SSD1306_I2c featherOLED(i2c); // I2C
-
// Hardware serial port over DAPLink
Serial daplink(P2_1, P2_0);
@@ -79,11 +77,13 @@
gLED = LED_ON;
bLED = LED_OFF;
+
+ Thread::wait(50); // Give the supplies time to settle before initializing the display
+ Adafruit_SSD1306_I2c featherOLED(i2c);
featherOLED.printf("%ux%u OLED Display\r\n", featherOLED.width(), featherOLED.height());
featherOLED.printf("HelloWorld \r");
featherOLED.display();
- rLED = LED_OFF;
while(1) {
Thread::wait(250);
