9 years, 7 months ago.

Example Code

Can someone please post an example code?

Question relating to:

A first port of the excellent Adafruit ST7735 library LCD, ST7735, TFT
  1. include "mbed.h"
  2. include "Adafruit_GFX.h"
  1. include "Adafruit_ST7735.h"

DigitalOut lite(PTC9);backlite connection

Adafruit_ST7735 display(PTD2, PTD3, PTD1, PTD0, PTD5, PTA13); MOSI, MISO, SCK,CS,RS,RESET; the actual pins of FRDM-KL25Z

int main() {

lite=1;

display.initR(INITR_GREENTAB);INITIALIZE THE DISPLAY display.fillScreen(ST7735_BLACK);

wait(1);

while(1) { display.fillRect(10, 10, 100, 100, ST7735_RED); DRAW A RECTANGLE wait(0.2);

} }

posted by utkarsh sinha 25 May 2015
Be the first to answer this question.