Navigation

    LILYGO

    • Register
    • Login
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    1. Home
    2. adam_II
    A
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 1
    • Best 0
    • Groups 0

    adam_II

    @adam_II

    0
    Reputation
    1
    Profile views
    1
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    adam_II Unfollow Follow

    Latest posts made by adam_II

    • LilyGO T-Display S3 with pcf8575

      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(){ 
      
      }
      
      posted in Common problems
      A
      adam_II