Posts

Showing posts with the label display ST7735 SPI

128x160 TFT/ST7735 SPI wih EP32C3 (arduino-esp32) using Arduino_GFX Library

Image
Previous post show 3.5 inch 480x320 TFT/ILI9488 SPI wih EP32C3 (arduino-esp32) using Arduino_GFX Library , here is how it display on 1.8 inch 128x160 ST7735 SPI TFT . Both the 3.5 inch 480x320 ILI9488 SPI TFT and 1.8 inch 128x160 ST7735 SPI TFT have the same pins assignment on TFT part, keep the connection keep no change. Code: c3_st7735_test.ino , for color and resolution test. /******************************************************************************* * Exercise of Arduino_GFX, color testing. * Run on Xiao ESP32C3 + 1.8 inch 128x160 ST7735 SPI TFT ******************************************************************************/ #include <Arduino_GFX_Library.h> #define TFT_CS 5 //GPIO5 #define TFT_RESET 3 //GPIO3 #define TFT_DC 4 //GPIO4 #define TFT_MOSI 10 //GPIO10/MOSI #define TFT_SCK 8 //GPIO8/SCK #define TFT_LED 2 //GPIO2 #define TFT_MISO -1 // not used for TFT #define GFX_BL TFT_LED // backlight pin /* More data bus cl...

Test 1.44" 128x128 ST7735 SPI TFTs, on XIAO nRF52840 Sense/CicuitPython

Image
These are two models of ST7735 SPI TFT LCD : - marked "haoda-SPI-144" green pcb - marked "KMR1441_SPI V2" red pcb both are 1.44 inch 128x128, but in difference setting. It's a exercise run on  XIAO nRF52840 Sense with CircuitPython 8.1.0-beta.1, to display on them using adafruit_st7735 and adafruit_st7735r libraries with parameters setting. remark: I bought "KMR1441_SPI V2" a few years ago. This exercise just for functional testing for programming, not for quality comparison. Libraries needed - adafruit_display_shapes folder - adafruit_st7735.mpy - adafruit_st7735r.mpy Connection #connection #TFT_GND GND #TFT_VCC 3V3 TFT_SCL = board.SCK #D8 TFT_SDA = board.MOSI #D10 TFT_RES = board.D3 TFT_DC = board.D4 TFT_CS = board.D5 #TFT_BL 3V3 Both LCDs connected in parallel. Exercise code cpynRF_st7735.py """ Test on two 1.44" 128x128 ST7735 SPI IFI - "haoda-SPI-144" green pcb - ...

my display modules: 1.44" 128x128 ST7735 SPI TFT

Image
These are two models of TFT LCDs, both are 1.44 inch 128x128. - marked "haoda-SPI-144" green pcb - marked "KMR1441_SPI V2" red pcb Both are 1.44 inch 128x128, but in difference setting. Check my test on XIAO nRF52840 Sense/CicuitPython .

Raspberry Pi Pico W/MicroPython act as socket client, connect to HC-25 WiFi Module.

Image
It's my MicroPython exercise run on Raspberry Pi Pico W , to act as WiFi station/socket client connect to socket server on HC-25 WiFi Module . Remark: In my trial, it's unstable to connect to HC-25 when I stop Raspberry Pi Pico W/MicroPython and run again. May be need power OFF-ON, some delay, or handle something, I have no any idea right now! mpyPicoW_SocketClient.py """ Raspberry Pi Pico W/MicroPython exercise: A simple socket client connect to HC-25 ref: Raspberry Pi Pico W official book: Connecting to the Internet with Raspberry Pi Pico W """ import sys import os import time import network import socket ssid = 'myHC-25' password = 'password' serverAddr = "192.168.4.1" serverPort = 8080 # To know WLAN status # It's helpflul in learning and debugging def understandWLAN(wwlan): print("------------------------------") print("Information to understand wlan") print(wwla...

Raspberry Pi Pico W/MicroPython x 0.96" 80x160 ST7735 SPI IPS

Image
This post show how to display on  0.96" 80x160 ST7735 SPI IPS , with  Raspberry Pi Pico W /MicroPython, using  boochow/MicroPython-ST7735 library . The original boochow/MicroPython-ST7735 target 128x160 ST7735 TFT LCD driver for MicroPython. This post show steps to install the library, and modify it to fix screen size, offset and color. Please note that the modification base on my own guessing and trying, not any official suggested approach. Connection: ST7735 Raspberry Pi Pico W --------------------------- BLK 3V3 CS GP15 DC GP14 RES GP13 SDA GP11 SCL GP10 VCC 3V3 GND GND Prepare library: Visit: https://github.com/boochow/MicroPython-ST7735 Copy and edit ST7735.py, save to to MicroPython device, name it myST7735.py. ... ScreenSize = ( 80, 160 ) ... def setStart(self, colstart, rowstart): self._offset[0] = colstart self._offset[1] = rowstart def initr( self ) : '''Initialize a red t...

80x160 ST7735S SPI TFT with Raspberry Pi Pico W/CircuitPython 8 Beta 5

Image
Display on 0.96" 80x160 (RGB) IPS with ST7735S SPI Driver with Raspberry Pi Pico W/CircuitPython 8.0.0 Beta 5 Prepare Libraries: Visit https://circuitpython.org/libraries , download and extract Bundle for Version 8.x matching with your CircuitPython version. Libraries need: adafruit_display_shapes folder adafruit_display_text folder adafruit_st7735r.mpy adafruit_ticks.mpy Copy to CircuitPython device's /lib  Connection: ST7735 Raspberry Pi Pico W --------------------------- BLK 3V3 CS GP15 DC GP14 RES GP13 SDA GP11 SCL GP10 VCC 3V3 GND GND Exercise Code: cpyPicoW_st7735r_simpletest.py modified from example st7735r_simpletest.py """ Copy from CircuitPython Lib example st7735r_simpletest.py """ # SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries # SPDX-License-Identifier: MIT """ This test will initialize the display using displayio and draw a solid green background, a smaller...

0.96" 80x160 (RGB) IPS with ST7735S SPI Driver

Image
0.96" 80x160 (RGB) IPS with ST7735S SPI Driver ~ Product page Exercise: ~  80x160 ST7735S SPI TFT with Raspberry Pi Pico W/CircuitPython 8 Beta 5 ~  Raspberry Pi Pico W/MicroPython x 0.96" 80x160 ST7735 SPI IPS

CircuitPython/ESP32-C3 + 1.8" 128x160 TFT ST7735 SPI

Image
This video demo the following exercise code tested on NodeMCU ESP-C3-32S-Kit running CircuitPython 7.3.2. to display on  1.8 inch 128x160 ST7735 SPI TFT . Libraries needed: - adafruit_st7735r.mpy - adafruit_display_text folder - adafruit_display_shapes folder (if you don't know how to download and install CircuitPython Library, read HERE ) Connection: VCC 3V3 GND GND CS IO1 RESET IO2 A0 IO6 SDA IO7 SCK IO8 LED 3V3 ST7735 SPI TFT +------------ +----------------| VCC | +--------------| GND | | +---| CS | | +-|---| RESET | | +-|-|---| A0 | | +-|-|-|---| SDA | | +-|-|-|-|---| SCK +-|--|-|-|-|-|---| LED | | | | | | | +-------------- | | | | | | | | | | | | | | NodeMCU ESP-C3-32S-Kit | | | | | | | +------------------+ | | | | | | | | | | | | | | | +---| IO1 | | | | | | +-----| IO2 | | | | | | ...

MicroPython/ESP32-C3 + 1.8" 128x160 TFT ST7735 SPI, using boochow/MicroPython-ST7735 library.

Image
boochow/MicroPython-ST7735 is a modified version of GuyCarver's ST7735.py ST7735 TFT LCD driver , for micropython-esp32. This video show steps to prepare boochow/MicroPython-ST7735 driver and font files. Tested on  Espressif ESP32-C3-DevKitM-1 running MicroPython v1.19.1, to display on  1.8 inch 128x160 ST7735 SPI TFT . Connection VCC 3V3 GND GND CS 4 RESET 5 A0 9 SDA 7 SCK 6 LED 3V3 Exercise graphicstest.py , modified to match our connection. from ST7735 import TFT from sysfont import sysfont from machine import SPI,Pin import time import math tft_CS = 4 tft_RESET=5 tft_A0=9 tft_SDA=7 tft_SCK=6 spi = SPI(1, baudrate=20000000, polarity=0, phase=0, miso=None) tft=TFT(spi,tft_A0,tft_RESET,tft_CS) tft.initr() tft.rgb(True) def testlines(color): tft.fill(TFT.BLACK) for x in range(0, tft.size()[0], 6): tft.line((0,0),(x, tft.size()[1] - 1), color) for y in range(0, tft.size()[1], 6): tft.line((0,0...

ESP32-C3 (arduino-esp32) display on ST7735 SPI TFT using Adafruit ST7735 and ST7789 Library

Image
This video show how  Espressif ESP32-C3-DevKitM-1 (arduino-esp32) display on 1.8" 128x160 ST7735 SPI TFT , using Adafruit ST7735 and ST7789 Library. Install Library In Arduino IDE, open Library Manager to install "Adafruit ST7735 and ST7789 Library by Adafruit" and other library dependencies. Connection ST7735 SPI         ESP32-C3-DevKitM-1 ------------------------------ VCC           3V3 GND GND CS 10 RESET 9 A0           8 SDA 6 SCK 4 LED 3V3 Run Example Open and run Examples > Adafruit ST7735 and ST7789 Library > graphicstest

1.8 inch 128x160 ST7735 SPI TFT

Image
 My display module - 1.8 inch 128x160 ST7735 SPI TFT ~ product page: LCD wiki - 1.8inch SPI Module ST7735S SKU:MSP1803 Exercise: ~  ESP32-C3 (arduino-esp32) display on ST7735 SPI TFT using Adafruit ST7735 and ST7789 Library ~  128x160 TFT/ST7735 SPI wih EP32C3 (arduino-esp32) using Arduino_GFX Library ~  MicroPython/ESP32-C3 + 1.8" 128x160 TFT ST7735 SPI, using boochow/MicroPython-ST7735 library ~  CircuitPython/ESP32-C3 + 1.8" 128x160 TFT ST7735 SPI