student project
Dependencies: mbed
Fork of myiot by
Diff: main.cpp
- Revision:
- 0:94c1a94c5a47
- Child:
- 1:e94d9dab0ef3
diff -r 000000000000 -r 94c1a94c5a47 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Sun May 08 02:49:10 2016 +0000 @@ -0,0 +1,47 @@ +#include "mbed.h" +#include "I2C_SSD1306Z.h" + + +I2C i2c(I2C_SDA, I2C_SCL); + +DigitalOut myled(LED1); +Serial pc(SERIAL_TX, SERIAL_RX); + +unsigned char BMP_Logo_ittraining[128*8] = { // IT Logo + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xF8,0xF8,0xF8,0xC0,0xC0,0xC0,0x00,0xC0,0xC0,0xC0,0xF8,0xF8,0xF8,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,0x80,0xC0,0xE0,0x78,0x78,0x70,0xE0,0xC0,0x00,0x60,0x60,0x60,0xE0,0xE0,0x60,0x78,0x78,0x70,0x60,0x60,0xE0,0x60,0x60,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0xF0,0xB0,0xB0,0x98,0x90,0x40,0xD0,0xF8,0x70,0x70,0xF0,0x58,0x10,0x00,0xB0,0xB0,0xB0,0xB0,0xF0,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0xF0,0x70,0x70,0x70,0xF0,0xF0,0x70,0x00,0xC0,0xC0,0xC0,0xC0,0xC0,0xD8,0xF8,0xF0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x61,0xF1,0xE7,0x87,0x07,0x01,0x01,0x01,0x00,0x01,0x01,0x01,0x07,0x87,0xC7,0xF1,0x61,0x21,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x83,0x87,0x8F,0x8D,0xFC,0xFC,0x8C,0x8C,0x80,0x00,0xF0,0xF0,0xF1,0x37,0x3F,0x3E,0x30,0xF0,0xF0,0x38,0x3F,0x3F,0x33,0xF0,0xF0,0x00,0x00,0x00,0x00,0xC0,0xC0,0xFF,0xFF,0xED,0xCD,0xCD,0xCD,0xC0,0xF2,0xDB,0xDE,0xCE,0xDE,0xFF,0xD2,0xC0,0xCD,0xCD,0xCD,0xCD,0xFF,0xFF,0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x10,0x7E,0xFF,0xC3,0x00,0x00,0x8F,0x8F,0x81,0xB9,0xB9,0xB9,0xB9,0xB9,0xB9,0xB9,0xB9,0x81,0x8F,0x8F,0x8F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x07,0x0F,0xBC,0xF8,0xF0,0xE0,0xF0,0xF8,0xBC,0x9E,0x07,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xFD,0xF1,0x01,0xFF,0xFF,0x01,0x71,0x7D,0x0C,0x00,0xFE,0xFE,0xFE,0x06,0x06,0x06,0xFF,0xFF,0x06,0x06,0x06,0xFE,0xFE,0x00,0x00,0x00,0x00,0x00,0xC7,0xC7,0xC7,0xC0,0xC0,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xF6,0xF6,0xFE,0xDE,0xDE,0xCE,0xCE,0xC6,0xC0,0xC0,0xC7,0xC7,0xC7,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x08,0x38,0x38,0x3D,0x3F,0x0F,0x00,0x03,0x83,0xC3,0xFF,0x7F,0x03,0x03,0x03,0xFF,0xFF,0x03,0x03,0x03,0xE3,0xC3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x1C,0x1C,0x0E,0x0E,0x0E,0x07,0x07,0x03,0x03,0x01,0x01,0x00,0x01,0x01,0x03,0x03,0x07,0x07,0x0E,0x0E,0x0E,0x1C,0x1C,0x0C,0x00,0x00,0x00,0x00,0x0C,0x0D,0x0C,0x0E,0x07,0x07,0x06,0x06,0x03,0x03,0x00,0x03,0x03,0x03,0x00,0x00,0x00,0x0F,0x0F,0x00,0x03,0x03,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x0E,0x0E,0x0E,0x0E,0x0F,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x0F,0x00,0x00,0x00,0x00,0x04,0x0C,0x0E,0x07,0x03,0x03,0x00,0x00,0x00,0x00,0x00,0x07,0x0F,0x0E,0x0E,0x0E,0x0F,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 +}; + +int main() +{ + + + printf("init oled\n"); + + Init_LCD(); + clear_LCD(); + + while (1) { + + + draw_LCD(BMP_Logo_ittraining); + wait(2.0); + clear_LCD(); + print_Line(0, "IT Maker Space"); + print_Line(1, "ARM mbed RTOS"); + print_Line(2, "ST Micro"); + print_Line(3, "ittraining.com"); + wait(2.0); + clear_LCD(); + + } + +} + +