Navigation

    LILYGO

    • Register
    • Login
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    LilyGO T-Display S3 with pcf8575

    Common problems
    2
    2
    170
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      adam_II last edited by

      LilyGO T-Display S3 connect to pcf8575 very slow!!
      more than 10 times with TTGO T-display.
      I do not know why?
      843BCB70-6725-4D93-8217-A2C2A3E3F843_1_105_c.jpeg milliseconds

      #include "Arduino.h"
      #include "PCF8575.h"
      
      #include <Wire.h>
      #include <TFT_eSPI.h> 
      #include <SPI.h>
      
      TFT_eSPI tft = TFT_eSPI(); 
      
      // Set i2c address
      PCF8575 pcf8575_a(0x20); //a2=0, a1=0;
      
      void setup()
      {
        Wire.begin(18,17);
        Wire.setClock(600000); 
        Serial.begin(115200);
        tft.init();
        tft.setRotation(1);
        tft.fillScreen(TFT_BLACK);
        tft.setFreeFont(&FreeMonoBold12pt7b);
        
        
        // Set pin to OUTPUT mode
        for(int i=0;i<16;i++) {
          pcf8575_a.pinMode(i, OUTPUT);
        }
        pcf8575_a.begin();
        long int t1 = millis();
        Serial.println("<< Runing >>");  
        tft.setCursor(0,22); 
        tft.print("Runing"); 
        for(int j=0;j< 65536*2 ;j++) {
          pcf8575_a.digitalWrite(1, HIGH);
          pcf8575_a.digitalWrite(1, LOW);
          if (j % 2048 == 0){ Serial.print(">"); tft.print("."); }
        }
        long int t2 = millis();   
        tft.print(t2-t1); 
        Serial.println();
        Serial.print("Time taked: "); Serial.print(t2-t1); Serial.println(" milliseconds");    
      }
      
      void loop(){ 
      
      }
      
      1 Reply Last reply Reply Quote 0
      • teastain
        teastain last edited by

        Can you say more specifically what is wrong?
        I do not understand the image that you sent.
        I can usually help with T-Display S3/ Arduino IDE issues!
        -Terry

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Powered by NodeBB | Contributors