M Michael1968 Active Member Licensed User Longtime User Oct 26, 2020 #1 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
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
Erel B4X founder Staff member Licensed User Longtime User Oct 27, 2020 #2 Post the link to that example. I'm not sure that it is related to this library. Upvote 0
M Michael1968 Active Member Licensed User Longtime User Oct 27, 2020 #3 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: 345 Last edited: Oct 27, 2020 Upvote 0
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);
Erel B4X founder Staff member Licensed User Longtime User Oct 28, 2020 #4 You can see the relevant C code in rAdafruit_ST7735.cpp. INITR_MINI160x80 = 4. Edit the file and change: B4X: if (Options < 3) st->initR(Options); else st->initB(); With: B4X: st->initR(Options); You should then pass 4 to InitializeHardware. Upvote 0
You can see the relevant C code in rAdafruit_ST7735.cpp. INITR_MINI160x80 = 4. Edit the file and change: B4X: if (Options < 3) st->initR(Options); else st->initB(); With: B4X: st->initR(Options); You should then pass 4 to InitializeHardware.