Color Oled(SSD1331) connect to STMicroelectronics Nucleo-F466

Dependencies:   ssd1331

main.cpp

Committer:
kadonotakashi
Date:
2018-10-11
Revision:
3:f3764f852aa8
Parent:
2:018812000e6e

File content as of revision 3:f3764f852aa8:

#include "mbed.h"

#include "ssd1331.h"

Thread thread;

void print_char(char c = '*')
{
    printf("%c", c);
    fflush(stdout);
}

void print_thread()
{
    while (true) {
        wait(1);
        print_char();
    }
}

ssd1331 oled(D11,D12,D13,D10,D9,D8);

int main()
{
    printf("\n\n*** RTOS basic example ***\n");
    thread.start(print_thread);


    oled.Initssd1331();
    oled.ClearScreen();
    oled.DrawRectangleFill(4,4,91,59,RGB565_GREEN,RGB565_YELLOW);
    oled.PutString(10,10,"hello",RGB565_BLUE,0);

    
 
    while (true) {
    }
}