Last active
October 3, 2016 08:14
-
-
Save bright-light-in-the-night/b882100de9e85030fdecdb63d8af0b37 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://ee-programming-notepad.blogspot.com/2016/10/c-array-of-pointers-to-objects.html | |
#include "mbed.h" | |
#include "ILI9340_Driver.h" | |
#define LCD_MOSI D11 | |
#define LCD_MISO D12 | |
#define LCD_SCK D13 | |
#define LCD_CS D5 | |
#define LCD_RST D3 | |
#define LCD_DC D7 | |
ILI9340_Display lcd(LCD_MOSI, LCD_MISO, LCD_SCK, LCD_CS, LCD_RST, LCD_DC); // MOSI, MISO, SCK, CS, RST, D/C | |
int main() { | |
lcd.DispInit(); | |
lcd.SetRotation(0); | |
lcd.FillScreen(ILI9340_BLUE); | |
lcd.DrawString("Test", 0, 0, 2, ILI9340_WHITE); // draw a text with 8px font | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment