Christopher H / Mbed 2 deprecated SSD1306_Test

Dependencies:   Adafruit_GFX mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 #include "Adafruit_SSD1306.h"
00003 DigitalOut myled(LED1);
00004 
00005 /*==> Interface Display <==*/
00006 I2C I2CDisp(PA_10, PA_9);
00007 Adafruit_SSD1306_I2c Disp(I2CDisp,PB_0);
00008 
00009 /*==> Interface Virtual COM PORT STProgrammer <==*/
00010 Serial pc(SERIAL_TX, SERIAL_RX);
00011 
00012 
00013 /* ==> Interface BNO_055  Shuttle Board <== */
00014 Serial BNO(PB_6, PB_7);
00015 DigitalOut BNO_RST(PB_1);
00016 DigitalOut BNO_InterfaceSEL(PA_0);
00017 
00018 
00019 
00020 int main() {
00021     /*Display Initialisierung*/
00022     Disp.clearDisplay();
00023     Disp.setRotation(2);
00024     Disp.printf("Hallo Davi \n");
00025     Disp.printf("Siehe Dokumente ... \n");
00026     Disp.display();
00027     /* HELLO World PC*/
00028     pc.printf("Hallo Davi !\n");
00029     /* Initialisierung BNO055*/
00030     BNO_RST = 1; // Reset Altive Low
00031     BNO_InterfaceSEL = 1; // Select UART Interface 
00032     BNO.baud(115200);
00033     /*Format Default 8N1 = 8data, no Parity bit, one Stop bit*/
00034     
00035     
00036     
00037     while(1) {
00038         myled = 1; // LED is ON
00039         wait(0.2); // 200 ms
00040         myled = 0; // LED is OFF
00041         pc.printf("Hallo Davi !\n");
00042         wait(1.0); // 1 sec
00043     }
00044 }