Graphics display library providing graphics primitives (points, lines, circles, etc.). It needs to be paired with a hardware-specific driver like LCDWIKI_GUI
#include<LCDWIKI_GUI.h>//Core graphics library#include<LCDWIKI_GUI.h>//Hardware-specific library#defineMODEL SSD1283A // Which controller does your LCD use
#defineCS 10 // Chip Select SPI pin (Might be called SS) - Wire this to pin 10 on an Arduino Pro Mini
#defineCD 12
#defineSDA 11 // if you use the hardware spi,this pin is no need to set - Wire this to pin 11, MOSI, on a Pro Mini
#defineMOSI SDA // An alias
#defineMISO 8 // unused - my SSD1283A is write-only (no read)
#defineSCK 13 //if you use the hardware spi,this pin is no need to set - Wire to pin 13 on a Pro Mini
#defineRST 9 // Reset pin - I use 9 on my Pro Mini
#defineLED -1 // My LED backlight is hard-wired to VCC: if you don't need to control the LED pin,you should set it to -1 and set it to 3.3V
LCDWIKI_GUImylcd(MODEL,CS,CD, MISO, MOSI, RST, SCK, LED); // Tell the lib what pins we are using#defineBLACK 0x0000
#defineRED 0xF800
voidsetup() {
mylcd.Init_LCD();
mylcd.Fill_Screen(BLACK);
}
voidloop() {
mylcd.Set_Text_Mode(0);
mylcd.Set_Text_colour(RED);
mylcd.Set_Text_Back_colour(BLACK);
mylcd.Set_Text_Size(1);
mylcd.Print_String("Hello World!", 0, 0);
...
}See the header file
(Method 1)
- Open a terminal (commandline, bash shell, whatever)
- Change into your Arduino folder
cd /Applications/Arduino.app/Contents/Java/libraries/
(or)
cd~/Arduino/libraries/- grab and install this code
git clone https://github.com/gitcnd/LCDWIKI_GUI.git- restart your arduino IDE
- Choose File => Examples => LCDWIKI_GUI => hello
- Hit the "build" button and enjoy!
(Method 2) - see https://www.arduino.cc/en/Guide/Libraries
- Download the ZIP of this repo: https://github.com/gitcnd/LCDWIKI_GUI/archive/master.zip
- In your IDE, select Sketch -> Include Library -> Add .ZIP Library
- Choose File => Examples => LCDWIKI_GUI => hello
- Hit the "build" button and enjoy!