Primarily configured for the Wavershare 1.8 inch TFT module https://www.waveshare.com/1.8inch-lcd-for-micro-bit.htm for Microbit the code in this extension is usable with other ST735S 1.8 TFT displays. The extension contains functions to initialize and create various geometric shapes on the display.
During the creation of this extension I used the extension at https://github.com/joy-it/pxt-RB-TFT1.8 for guidance and included a trimmed version of their string drawing routine. I also drew inspiration from the methods in this example https://simple-circuit.com/st7735-tft-vertical-scrolling-ccs-c/ and included the scrolling method in the extension.
Open this page at https://jeff-squared.github.io/pxt-18-tft/
This repository can be added as an extension in MakeCode.
- open https://makecode.microbit.org/
- click on New Project
- click on Extensions under the gearwheel menu
- search for https://github.com/jeff-squared/pxt-18-tft and import
To edit this repository in MakeCode.
- open https://makecode.microbit.org/
- click on Import then click on Import URL
- paste https://github.com/jeff-squared/pxt-18-tft and click import
This image shows the blocks code from the last commit in master. This image may take a few minutes to refresh.
- for PXT/microbit