Skip to content

Instantly share code, notes, and snippets.

@bright-light-in-the-night
Last active October 3, 2016 08:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bright-light-in-the-night/b882100de9e85030fdecdb63d8af0b37 to your computer and use it in GitHub Desktop.
Save bright-light-in-the-night/b882100de9e85030fdecdb63d8af0b37 to your computer and use it in GitHub Desktop.
// 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