![]() Serial.print(F("Hello! ST77xx TFT Test")) ![]() Tft.drawTriangle(w, y, y, x, z, x, color) Void testdrawcircles(uint8_t radius, uint16_t color)įor (int16_t x = 0 x < tft.width() + radius x += radius * 2)įor (int16_t y = 0 y < tft.height() + radius y += radius * 2) Void testfillcircles(uint8_t radius, uint16_t color)įor (int16_t x = radius x < tft.width() x += radius * 2)įor (int16_t y = radius y < tft.height() y += radius * 2) Tft.drawRect(tft.width() / 2 - x / 2, tft.height() / 2 - x / 2, x, x, color2) Tft.fillRect(tft.width() / 2 - x / 2, tft.height() / 2 - x / 2, x, x, color1) #define TFT_RST -1 // Or set to -1 and connect to Arduino RESET pinĪdafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, -1) #include // Hardware-specific library for ST7789 #include // Hardware-specific library for ST7735 Nothing prints one the screen, the backlight doesn't lit too.Īnd the code I use: #include // Core graphics library Like use SDA/SCL next to D13 labelled pin on mega, SDA/SCL pins 20 & 21, I see somewhere D51 and D52 where SCL/SDA pins. I try many thing because it's not well documented. I have a cheap oled display that is labelled with GND, VCC, SCL, SDA, RES, DC, CS, BLK( ) If I understand correctly, SSD1306 works with I2C and need SDA/SCL on pins 20(SDA) and 21(SCL) th rest was handled by the library. I used to work with a SSD1306 for a project, but now I want to upgrade the display and use a ST7735.
0 Comments
Leave a Reply. |