Open amitnjha opened 1 year ago
This example used with Arduino IDE works for me: https://github.com/adafruit/Adafruit-ST7735-Library/blob/master/examples/graphicstest_st7789/graphicstest_st7789.ino
Modifications needed:
#define TFT_CS 9 \
#define TFT_RST 12 // Or set to -1 and connect to Arduino RESET pin \
#define TFT_DC 8 \
//Adafruit_ST7789 tft = Adafruit_ST7789(TFT_CS, TFT_DC, TFT_RST);
// OPTION 2 lets you interface the display using ANY TWO or THREE PINS,
// tradeoff being that performance is not as fast as hardware SPI above.
#define TFT_MOSI 11 // Data out
#define TFT_SCLK 10 // Clock out
Adafruit_ST7789 tft = Adafruit_ST7789(TFT_CS, TFT_DC, TFT_MOSI, TFT_SCLK, TFT_RST);
tft.init(135, 240);
Rotation after initialization:
tft.setRotation(tft.getRotation()+3);
I am looking for some example code as to how I can do similar implementation in C like you have provided examples for Python. The issue I am having is printing out anything to the ST7789 TFT display.
I took example from here and tried adjusting SPI parameters as per SPI configuration you have in python code, but it does not work.
Can you please advice on it? Awesome product by the way 👍. We have bought four so far and are looking to get four more at least.