Team Project / Mbed OS FTHR_OLED_CodeForFTHR

Dependencies:   max32630fthr Adafruit_FeatherOLED USBDevice

Revision:
11:d58cc7ff04d4
Parent:
10:1f5e78dd4a7c
Child:
12:e8ac4f6154de
diff -r 1f5e78dd4a7c -r d58cc7ff04d4 main.cpp
--- a/main.cpp	Wed Feb 08 00:50:27 2017 +0000
+++ b/main.cpp	Thu Feb 06 13:20:46 2020 +0000
@@ -80,34 +80,37 @@
 
     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.clearDisplay();
+    //featherOLED.printf("%ux%u OLED Display\r\n", featherOLED.width(), featherOLED.height());
+   // featherOLED.printf("HelloWorld \r");
     featherOLED.display();
+    featherOLED.setTextSize(1);
 
 
     while(1) {
         Thread::wait(250);
-        if (microUSB.readable()) {
-            c = microUSB.getc();
-            microUSB.putc(c);
-            daplink.putc(c);
-        }
-        if (daplink.readable()) {
-            c = daplink.getc();
-            microUSB.putc(c);
-            daplink.putc(c);
-        }
-        rLED = aButton;
-        gLED = bButton;
-        bLED = cButton;
+//        if (microUSB.readable()) {
+//            c = microUSB.getc();
+//            microUSB.putc(c);
+//            daplink.putc(c);
+//        }
+//        if (daplink.readable()) {
+//            c = daplink.getc();
+//            microUSB.putc(c);
+//            daplink.putc(c);
+//        }
+//        rLED = aButton;
+//        gLED = bButton;
+//        bLED = cButton;
         featherOLED.clearDisplay();
-        featherOLED.setTextCursor(0,0);
+        featherOLED.setTextCursor(0,0); 
         featherOLED.printf("MAX32630FTHR OLED\n");
-        featherOLED.printf("AIN0/1: %1.2f, %1.2f\n", (6.0f * ain0), (6.0f * ain1) );  // analog inputs 0,1
-        featherOLED.printf("AIN2/3: %1.2f, %1.2f\n", (1.2f * ain2), (1.2f * ain3) );  // analog inputs 2,3
-        featherOLED.printf("UART:%c  A:%d  B:%d  C:%d\n", c, aButton.read(), bButton.read(), cButton.read());  // UART and Buttons
+        featherOLED.printf("TEST CODE");
+//        featherOLED.printf("AIN0/1: %1.2f, %1.2f\n", (6.0f * ain0), (6.0f * ain1) );  // analog inputs 0,1
+//        featherOLED.printf("AIN2/3: %1.2f, %1.2f\n", (1.2f * ain2), (1.2f * ain3) );  // analog inputs 2,3
+//        featherOLED.printf("UART:%c  A:%d  B:%d  C:%d\n", c, aButton.read(), bButton.read(), cButton.read());  // UART and Buttons
         featherOLED.display();
-
+//
     }
 }