# ST7735 LCD TestimportmachineimportST7735# SCL=2 and SDK=3 implied for bus 0spi=machine.SPI(0,baudrate=8000000)d=ST7735.ST7735(spi,rst=4,ce=6,dc=5)d.reset()d.begin()d.set_rotation(1)d._bground=0xffff# whited.fill_screen(d._bground)# make background all whited._color=0x0000# black inkd.p_string(10,10,'Hello World!')
Config File
1 2 3 4 5 6 7 8 9101112131415161718
# Hardware configuration file for ST7735 clockSPI_BUS=0SPI_SCL_PIN=2# ClockSPI_SDA_PIN=3# labeled SDI(MOSI) on the back of the displaySPI_RESET_PIN=4# ResetSPI_DC_PIN=5# Data/commandSPI_CS_PIN=6# Chip Select# Screen DimensionsDISPLAY_WIDTH=160DISPLAY_HEIGHT=128DISPLAY_ROTATION=1# Use builtin pull upsMODE_PIN=14# one up from lower-left cornerINCREMENT_PIN=15# lower left corner with USB on topDECREMENT_PIN=16# lower left corner with USB on top