Giter VIP home page Giter VIP logo

lcdwiki_spi's Introduction

LCDWIKI_SPI

An SPI display library for LCD panels using ILI9325, ILI9328, ILI9341, HX8357D, HX8347G, HX8347I, ILI9486, ST7735S, or SSD1283A controllers

SYNOPSIS

  #include <LCDWIKI_GUI.h> //Core graphics library
  #include <LCDWIKI_SPI.h> //Hardware-specific library

  #define MODEL SSD1283A	// Which controller does your LCD use
  #define CS   10		// Chip Select SPI pin (Might be called SS) - Wire this to pin 10 on an Arduino Pro Mini
  #define CD   12
  #define SDA  11		// if you use the hardware spi,this pin is no need to set - Wire this to pin 11, MOSI, on a Pro Mini
  #define MOSI SDA		// An alias
  #define MISO 8		// unused - my SSD1283A is write-only (no read)
  #define SCK  13 		//if you use the hardware spi,this pin is no need to set - Wire to pin 13 on a Pro Mini
  #define RST  9		// Reset pin - I use 9 on my Pro Mini
  #define LED  -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_SPI mylcd(MODEL,CS,CD, MISO, MOSI, RST, SCK, LED); // Tell the lib what pins we are using

  #define  BLACK   0x0000
  #define RED     0xF800

  void setup() 
  {
    mylcd.Init_LCD();
    mylcd.Fill_Screen(BLACK);
  }

  void loop() {
    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);

    ...
  }

FUNCTIONS

See the header file

HOW TO INSTALL

(Method 1)

  1. Open a terminal (commandline, bash shell, whatever)
  2. Change into your Arduino folder
   cd /Applications/Arduino.app/Contents/Java/libraries/
   (or)
   cd ~/Arduino/libraries/
  1. grab and install this code
   git clone https://github.com/gitcnd/LCDWIKI_SPI.git
  1. restart your arduino IDE
  2. Choose File => Examples => LCDWIKI_SPI => hello
  3. Hit the "build" button and enjoy!

(Method 2) - see https://www.arduino.cc/en/Guide/Libraries

  1. Download the ZIP of this repo: https://github.com/gitcnd/LCDWIKI_SPI/archive/master.zip
  2. In your IDE, select Sketch -> Include Library -> Add .ZIP Library
  3. Choose File => Examples => LCDWIKI_SPI => hello
  4. Hit the "build" button and enjoy!

lcdwiki_spi's People

Contributors

gitcnd avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.