B4R Question ST7735s 0.96" TFT how to change options ?

Michael1968

Active Member
Licensed User
Hi,

I have a 0.96" ST7735s TFT Display
and i want to use rAdafruitST7735 library


there are 3 options:
B4r:
st.InitializeHardware(5,23,18,option)
//Options: 0 = ST7735R green tab, 1 = ST7735R red tab, 2 = ST7735R black tab, 3 = ST7735B.

with this options the display did not work.

now i have find out in a Arduino example , to add option :
initR(INITR_MINI160x80); // initialize a ST7735S chip, mini display

but i could not find out how and where to do it in library.
hardcoded will be ok.

Best reagards
Michael
 

Michael1968

Active Member
Licensed User
I use this example : Arduino code
with this board https://docs.m5stack.com/#/en/core/m5stickc

I only make some changes and it work with arduino
graphictest.ino:
#define TFT_RST  18
#define TFT_CS   5
#define TFT_DC   23


Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS,  TFT_DC, TFT_RST);

void setup(void) {
  Serial.begin(115200);
 
  Serial.println("Hello! ST77xx TFT Test");
 
//  if (!ss.begin()) {
//    Serial.println("seesaw init error!");
//    while(1);
//  }
//  else Serial.println("seesaw started");
//
//  ss.tftReset();
//  ss.setBacklight(0x0); //set the backlight fully on

  // Use this initializer (uncomment) if you're using a 0.96" 180x60 TFT
  tft.initR(INITR_MINI160x80);   // initialize a ST7735S chip, mini display
  Serial.print(INITR_MINI160x80);
 

Attachments

  • graphicstest_m5stickc.zip
    48.1 KB · Views: 99
Last edited:
Upvote 0
Top