# Adafruit Circuit Playground TFT Gizmo

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/081/936/medium800thumb/express_gizmo-product-7.jpg?1570130094)

Extend and expand your Circuit Playground projects with a bolt on TFT Gizmo that lets you add a lovely color display in a sturdy and reliable fashion. This PCB looks just like a round TFT breakout but has permanently affixed M3 standoffs that act as mechanical and electrical connections.

Once attached you'll get a 1.54" 240x240 IPS display with backlight control, two 3-pin STEMMA connectors for&nbsp;[attaching NeoPixel strips](https://www.adafruit.com/product/3919)&nbsp;or&nbsp;[servos](https://www.adafruit.com/product/4326), and a Class D audio amplifier with&nbsp;[a Molex PicoBlade connector that can plug one of our lil speakers](https://www.adafruit.com/?q=molex%20speaker).

![](https://cdn-learn.adafruit.com/assets/assets/000/081/652/medium800/express_gizmo-product-5.jpg?1569864035)

This is a great companion for our Circuit Playground Express or Bluefruit boards thanks to their fast SPI hardware speeds, and works in Arduino and CircuitPython. You can use it with the Circuit Playground Classic but it won't be very fast, as you have to bitbang the SPI - and the display has a lot of pixels - so it's not recommended.

Comes with a PCB that has pre-soldered standoffs attached, and 12x M3 screws for attachment. Fits all Circuit Playgrounds but like we mentioned earlier, the Express and Bluefruit are recommended.

![](https://cdn-learn.adafruit.com/assets/assets/000/081/654/medium800/express_gizmo-product-2.jpg?1569864073)

# Adafruit Circuit Playground TFT Gizmo

## Pinouts

![](https://cdn-learn.adafruit.com/assets/assets/000/081/737/medium800/express_pinouts_fround.jpg?1569876824)

The TFT Gizmo uses SPI to receive image data. That means at least 5 pads are used - **clock** , **data in** , **tft cs** and **d/c**. An additional pin is used as a backlight control. These are already determined because of the bolt-on design. The TFT Gizmo also has a built-in audio amplifier and 2 JST connectors.

## Power Pins
- **VOUT** &nbsp;- power input, connect to 3-5VDC.
- **GND&nbsp;** - power and signal ground. Connect to your power supply and microcontroller ground.
- **3.3V&nbsp;** - power input, connected to the 3.3V output of the Circuit Playground. Also, if you have a need for a clean 3.3V output, you can use this! It can provide at least 100mA output.

![express_pinouts_power.jpg](https://cdn-learn.adafruit.com/assets/assets/000/081/937/medium640/express_pinouts_power.jpg?1570132233)

## SPI Display Pins
- The display used on the TFT Gizmo is a 1.54" IPS TFT ST7789 display.

![express_pinouts_display.jpg](https://cdn-learn.adafruit.com/assets/assets/000/081/740/medium640/express_pinouts_display.jpg?1570132268)

Warning: 

## Audio Pins
There is a&nbsp; **speaker connector** &nbsp;with a mono 2.5 Watt Class D audio amp connected to&nbsp; **A0** &nbsp;or **AUDIO** - that's the DAC output on the SAMD21 and SAMD51. It is good for many simple sound effects or musical output.

![express_pinouts_audio.jpg](https://cdn-learn.adafruit.com/assets/assets/000/096/157/medium640/express_pinouts_audio.jpg?1603213582)

## Extra Ports
There are two additional ports that can be used for connecting external sensors or NeoPixels.

- On the **left** is a&nbsp;port, this is a&nbsp; **JST 3-PH port** &nbsp;and is connected to **A1**.
- On the **right** is another port, this is a&nbsp; **JST 3-PH port** &nbsp;and is connected to **A2**.

![express_pinouts_jst.jpg](https://cdn-learn.adafruit.com/assets/assets/000/081/742/medium640/express_pinouts_jst.jpg?1570132372)

# Adafruit Circuit Playground TFT Gizmo

## Assembly

Info: 

Placing the Circuit Playground TFT Gizmo on the Circuit Playground Express or Circuit Playground Bluefruit is pretty straightforward. All you need is a #2 Phillips screwdriver.

Info: 

The amber colored Kapton tape dots must be removed from each of the twelve standoffs before assembling the boards. These are electrically insulating and will prevent the Gizmo from working properly if left in place.

You can use your fingernails or some tweezers or a pin to poke and lift each dot as shown here.

![express_giz_kap01.jpg](https://cdn-learn.adafruit.com/assets/assets/000/083/582/medium640/express_giz_kap01.jpg?1572931770)

![express_giz_kap02.jpg](https://cdn-learn.adafruit.com/assets/assets/000/083/583/medium640/express_giz_kap02.jpg?1572931781)

![express_giz_kap03.jpg](https://cdn-learn.adafruit.com/assets/assets/000/083/584/medium640/express_giz_kap03.jpg?1572931791)

Start by aligning the two boards side by side like in the photo with the black plastic speaker connector and battery connectors pointing in the same direction.

![express_assembly_step1.jpeg](https://cdn-learn.adafruit.com/assets/assets/000/081/743/medium640/express_assembly_step1.jpeg?1569885937)

Place the Circuit Playground board on top of the Gizmo being sure that the connectors mentioned in the previous step are still aligned.

![express_assembly_step2a.jpeg](https://cdn-learn.adafruit.com/assets/assets/000/081/744/medium640/express_assembly_step2a.jpeg?1569886020)

![express_assembly_step2b.jpeg](https://cdn-learn.adafruit.com/assets/assets/000/081/746/medium640/express_assembly_step2b.jpeg?1569886053)

Install a few screws loosely, so that all of the holes are still aligned, before tightening them down.

![express_assembly_step3.jpeg](https://cdn-learn.adafruit.com/assets/assets/000/081/747/medium640/express_assembly_step3.jpeg?1569886127)

Finish installing the remaining screws. After that, you're done!

![express_assembly_step4.jpeg](https://cdn-learn.adafruit.com/assets/assets/000/081/748/medium640/express_assembly_step4.jpeg?1569886189)

# Adafruit Circuit Playground TFT Gizmo

## TFT Gizmo Test

![](https://cdn-learn.adafruit.com/assets/assets/000/085/933/medium800thumb/express_gizmo11-17.jpg?1576642220)

Once you've assembled the TFT Gizmo onto your Circuit Playground you can test it by loading one of these pre-made UF2 onto your Circuit Playground with the TFT Gizmo attached - it will perform a graphics test so you know that the Gizmo's attached!

Info: 

## Circuit Playground Express

If you have a [Circuit Playground Express](https://www.adafruit.com/product/3333), download this UF2 file by clicking below:

[Circuit_Playground_Express_TFT_Gizmo.UF2](https://cdn-learn.adafruit.com/assets/assets/000/087/915/original/Circuit_Playground_Express_TFT_Gizmo.UF2?1580493688)
## Circuit Playground Bluefruit

If you have a [Circuit Playground Bluefruit](https://www.adafruit.com/product/4333), download this UF2 file by clicking below:

[Circuit_Playground_Bluefruit___TFT_Gizmo.UF2](https://cdn-learn.adafruit.com/assets/assets/000/085/932/original/Circuit_Playground_Bluefruit___TFT_Gizmo.UF2?1576641935)
## Running Text Example UF2

Once you've downloaded the appropriate UF2 file from above, plug in your Circuit Playground to your computer with a data/sync cable.

Double-click the reset button so that the boot drive folder shows up. This folder should be called **CPLAYBOOT** for the CP Express and **CPLAYBTBOOT** for the CP Bluefruit.

Drag-n-drop the downloaded UF2 onto **CPLAYBOOT** or **CPLAYBTBOOT** folder.

Press reset button to launch the code. If you don't get graphics on the TFT, check [the assembly instructions on this page](https://learn.adafruit.com/adafruit-tft-gizmo/assembly)

This sketch is in Arduino, so after you've run this UF2, [if you want to go back to CircuitPython, you'll need to re-install the CircuitPython UF2](https://circuitpython.org/downloads)

# Adafruit Circuit Playground TFT Gizmo

## Arduino Libraries & Test

![](https://cdn-learn.adafruit.com/assets/assets/000/081/749/medium800/express_gizmo-product-4.jpg?1569887166)

Danger: 

## Install Arduino Libraries

We have example code ready to go for use with these TFTs. It's written for Arduino, which should be portable to any microcontroller by adapting the C++ source.

_Four_&nbsp;libraries need to be installed&nbsp;using the&nbsp; **Arduino Library Manager** …this is the preferred and modern way. From the Arduino “Sketch” menu, select “Include Library” then “Manage Libraries…”

![](https://cdn-learn.adafruit.com/assets/assets/000/081/750/medium800/express_arduino_compatibles_manage-libraries.png?1569887298)

Type “gfx” in the search field to quickly find the first library —&nbsp; **Adafruit\_GFX** :

![](https://cdn-learn.adafruit.com/assets/assets/000/081/751/medium800/express_arduino_compatibles_adafruit-gfx-library-manager.png?1569887322)

Repeat the search and install steps, looking for the **Adafruit BusIO** ,&nbsp; **Adafruit Zero DMA** , **Adafruit ST7735 and ST7789** , and **Adafruit SPIFlash**** &nbsp;**libraries.

After restarting the Arduino software, you should see a new **example** folder called **Adafruit ST7735 and ST7789 Library,&nbsp;** and inside, an example called **graphicstest\_tft\_gizmo**.

![](https://cdn-learn.adafruit.com/assets/assets/000/081/752/medium800/express_arduino_7789_library.jpg?1569888290)

Now upload the sketch to your Circuit Playground board. You may need to press the Reset button to reset the Circuit Playground and TFT. You should see a collection of graphical tests draw out on the TFT.

![](https://cdn-learn.adafruit.com/assets/assets/000/081/914/medium800/express_arduino_tests.jpeg?1570049680)

## Running in Software SPI mode

If you have a CircuitPlayground Classic or just want to run it as Software SPI for whatever reason, it's pretty easy to change. Due to the nature of the circular bolt-on style board that the gizmo is, physically changing pins isn't so easy, but we can change to software SPI, which is a bit slower. Find these lines:

```python
// OPTION 1 (recommended) is to use the HARDWARE SPI pins, which are unique
// to each board and not reassignable.
Adafruit_ST7789 tft = Adafruit_ST7789(spi, TFT_CS, TFT_DC, TFT_RST);

// OPTION 2 lets you interface the display using ANY TWO or THREE PINS,
// tradeoff being that performance is not as fast as hardware SPI above.
//#define TFT_MOSI      PIN_WIRE_SDA  // Data out
//#define TFT_SCLK      PIN_WIRE_SCL  // Clock out
//Adafruit_ST7789 tft = Adafruit_ST7789(TFT_CS, TFT_DC, TFT_MOSI, TFT_SCLK, TFT_RST);
```

Comment out option 1, and uncomment option 2 Then you can change the **TFT\_** &nbsp;pins to whatever pins you'd like!

# Adafruit Circuit Playground TFT Gizmo

## Adafruit GFX library

![](https://cdn-learn.adafruit.com/assets/assets/000/019/543/medium800/adafruit_products_128x128_top_display_07_ORIG.jpg?1409937908)

The Adafruit\_GFX library for Arduino provides a common syntax and set of graphics functions for all of our TFT, LCD and OLED displays. This allows Arduino sketches to easily be adapted between display types with minimal fuss…and any new features, performance improvements and bug fixes will immediately apply across our complete offering of color displays.  
  
The GFX library is what lets you draw points, lines, rectangles, round-rects, triangles, text, etc.

![](https://cdn-learn.adafruit.com/assets/assets/000/019/544/medium800/adafruit_products_128x128_top_display_08_ORIG.jpg?1409937941)

Check out our detailed tutorial here [http://learn.adafruit.com/adafruit-gfx-graphics-library](http://learn.adafruit.com/adafruit-gfx-graphics-library) It covers the latest and greatest of the GFX library!

# Adafruit Circuit Playground TFT Gizmo

## Arcada Libraries

OK now that you have Arduino IDE set up, drivers installed if necessary and you've practiced uploading code, you can start installing all the Libraries we'll be using to program it.

**There's a lot of libraries!**

# Install Libraries

Open up the library manager...

![](https://cdn-learn.adafruit.com/assets/assets/000/073/288/medium800/circuitpython_managelib.png?1552873775)

And install the following libraries:

## Adafruit Arcada

This library generalizes the hardware for you so you can read the joystick, draw to the display, read files, etc. without having to worry about the underlying methods

![](https://cdn-learn.adafruit.com/assets/assets/000/075/990/medium800/adafruit_products_image.png?1558676193)

Warning: 

## If you aren't running Arduino IDE 1.8.10 or later, you'll need to install _all_ of the following!

&nbsp;

## Adafruit NeoPixel

This will let you light up the status LEDs on the front/back

![](https://cdn-learn.adafruit.com/assets/assets/000/073/289/medium800/circuitpython_adafruit_products_image.png?1552873804)

# Adafruit FreeTouch

This is the open source version of QTouch for SAMD21 boards

![](https://cdn-learn.adafruit.com/assets/assets/000/081/517/medium800/adafruit_products_image.png?1569566140)

# Adafruit Touchscreen

Used by Adafruit Arcada for touchscreen input (required even if your Arcada board does not have a touchscreen)

![](https://cdn-learn.adafruit.com/assets/assets/000/076/086/medium800/adafruit_products_image.png?1558904134)

## Adafruit SPIFlash

This will let you read/write to the onboard FLASH memory with super-fast QSPI support

![](https://cdn-learn.adafruit.com/assets/assets/000/073/292/medium800/circuitpython_adafruit_products_SPIFlash_lib.jpg?1552873977)

## Adafruit Zero DMA

This is used by the Graphics Library if you choose to use DMA

![](https://cdn-learn.adafruit.com/assets/assets/000/073/291/medium800/circuitpython_adafruit_products_zeroDMA_lib.jpg?1552873858)

## Adafruit GFX

This is the graphics library used to draw to the screen

![](https://cdn-learn.adafruit.com/assets/assets/000/073/293/medium800/circuitpython_image.png?1552874131)

If using an older (pre-1.8.10) Arduino IDE, locate and install **Adafruit\_BusIO** (newer versions do this one automatically).

## Adafruit ST7735

The display on the PyBadge/PyGamer & other Arcada boards

![](https://cdn-learn.adafruit.com/assets/assets/000/075/987/medium800/adafruit_products_image.png?1558675936)

## Adafruit ILI9341

The display on the PyPortal & other Arcada boards

![](https://cdn-learn.adafruit.com/assets/assets/000/076/110/medium800/adafruit_products_image.png?1558926181)

## Adafruit LIS3DH

For reading the accelerometer data, required even if one is not on the board

![](https://cdn-learn.adafruit.com/assets/assets/000/075/988/medium800/adafruit_products_image.png?1558676020)

## Adafruit Sensor

Needed by the LIS3DH Library, required even if one is not on the board

![](https://cdn-learn.adafruit.com/assets/assets/000/075/989/medium800/adafruit_products_image.png?1558676086)

# Adafruit ImageReader

For reading bitmaps from SPI Flash or SD and displaying

![](https://cdn-learn.adafruit.com/assets/assets/000/073/298/medium800/circuitpython_image.png?1552874434)

# ArduinoJson

We use this library to read and write configuration files

![](https://cdn-learn.adafruit.com/assets/assets/000/076/085/medium800/adafruit_products_image.png?1558840996)

# Adafruit ZeroTimer

We use this library to easily set timers and callbacks on the SAMD processors

![](https://cdn-learn.adafruit.com/assets/assets/000/076/181/medium800/adafruit_products_image.png?1559138259)

# Adafruit TinyUSB

This lets us do cool stuff with USB like show up as a Keyboard or Disk Drive

![](https://cdn-learn.adafruit.com/assets/assets/000/078/489/medium800/adafruit_products_image.png?1563856960)

# Adafruit WavePlayer

Helps us play .WAV sound files.

![](https://cdn-learn.adafruit.com/assets/assets/000/083/175/medium800/adafruit_products_waveplayer-install.png?1572322178)

## SdFat (Adafruit Fork)

The Adafruit fork of the really excellent SD card library that gives a lot more capability than the default SD library

![](https://cdn-learn.adafruit.com/assets/assets/000/083/166/medium800/adafruit_products_image.png?1572315153)

# Audio - Adafruit Fork

Our fork of the Audio library provides a toolkit for building streaming audio projects.

![](https://cdn-learn.adafruit.com/assets/assets/000/087/841/medium800/adafruit_products_audio.png?1580397029)

# Adafruit Circuit Playground TFT Gizmo

## Drawing Bitmaps

Danger: 

Although there isn't a built in microSD card slot, we can still use the SPI flash to store and load bitmap images! It's really easy with Adafruit Arcada because it can make the SPI flash show up as a drive on your computer that you can easily copy files over to.  
  
Let's start by downloading this image of Adabot and Blinka.

Primary: 

Info: 

![](https://cdn-learn.adafruit.com/assets/assets/000/081/945/medium800/express_adabot.bmp?1570136108)

![](https://cdn-learn.adafruit.com/assets/assets/000/081/946/medium800/express_blinka.bmp?1570136117)

## Required Libraries for Bitmaps

To draw Bitmaps, we'll be using the Arcada library, but there are a few other required libraries as well. If you haven't already, go ahead and take a look at the Arcada Libraries page to get all set up.

## TinyUSB
Now that you have the required libraries installed, there is one last thing to do if you are using the Circuit Playground Express. You will need to change your USB Stack over to TinyUSB.

&nbsp;

![express_tinyusb.png](https://cdn-learn.adafruit.com/assets/assets/000/081/948/medium640/express_tinyusb.png?1570136919)

## Arcada Library
Info: 

Start by opening the **File→examples→Adafruit Arcada Library→**** imageloader\_tft\_gizmo**&nbsp;example:

![](https://cdn-learn.adafruit.com/assets/assets/000/082/650/medium800/express_imageloader_example.jpg?1571686519)

## Uploading the Images
Now upload the example sketch to the Circuit Playground.

If you have not previously initialized the filesystem, you may receive a messages stating so. Go ahead and load CircuitPython on the device to initialize the files. If you are not sure how, you can check out our [Welcome to CircuitPython guide](https://learn.adafruit.com/welcome-to-circuitpython/installing-circuitpython).

After it is initialized, go ahead and upload the sketch again.

![express_filesystem.jpeg](https://cdn-learn.adafruit.com/assets/assets/000/083/967/medium640/express_filesystem.jpeg?1573250464)

After it finishes uploading, and with the Circuit Playground board connected over USB, it should appear on your computer as a flash drive called CIRCUITPY.

![express_CIRCUITPY.png](https://cdn-learn.adafruit.com/assets/assets/000/081/908/medium640/express_CIRCUITPY.png?1570048723)

Now go ahead and copy **adabot.bmp** and **blinka.bmp** onto the root of the **CIRCUITPY** drive.

Press the buttons on the back of your Circuit Playground board. Pressing one should make ADABOT appear! Pressing the other will make BLINKA appear. If you have any problems, check the serial console for any messages such as not being able to initialize the flash or not finding the image.

![](https://cdn-learn.adafruit.com/assets/assets/000/081/923/medium800/express_imageloader.jpeg?1570052595)

## Full ImageLoader Example
https://github.com/adafruit/Adafruit_Arcada/blob/master/examples/imageloader_tft_gizmo/imageloader_tft_gizmo.ino

# Adafruit Circuit Playground TFT Gizmo

## CircuitPython Displayio Quickstart

You will need a board capable of running CircuitPython such as the Circuit Playground Express or Circuit Playground Bluefruit. The Circuit Playground Classic will only run Arduino sketches.

Warning: 

Featured
### Circuit Playground Bluefruit - Bluetooth® Low Energy

[Circuit Playground Bluefruit - Bluetooth® Low Energy](https://www.adafruit.com/product/4333)
 **Circuit Playground Bluefruit** is our third board in the Circuit Playground series, another step towards a perfect introduction to electronics and programming. We've taken the popular Circuit Playground Express and made it even better! Now the main chip is an nRF52840...

Out of Stock
[Buy Now](https://www.adafruit.com/product/4333)
[Related Guides to the Product](https://learn.adafruit.com/products/4333/guides)
![shot of a Black woman's neon-green manicured hand holding up a Circuit Playground Bluefruit glowing rainbow LEDs.](https://cdn-shop.adafruit.com/640x480/4333-11.jpg)

Featured
### Circuit Playground Express

[Circuit Playground Express](https://www.adafruit.com/product/3333)
 **Circuit Playground Express** is the next step towards a perfect introduction to electronics and programming. We've taken the original Circuit Playground Classic and made it even better! Not only did we pack even more sensors in, we also made it even easier to...

Out of Stock
[Buy Now](https://www.adafruit.com/product/3333)
[Related Guides to the Product](https://learn.adafruit.com/products/3333/guides)
![A Black woman's manicured hand holds a round microcontroller with lit up LEDs.](https://cdn-shop.adafruit.com/640x480/3333-05.jpg)

## Circuit Playground Express with Displayio

If you have a Circuit Playground Express board, you will need a special build that includes displayio to use the TFT Gizmo. Be sure to download the latest one. You can find it here:

[CircuitPython for Circuit Playground Express with displayio](https://adafruit-circuit-python.s3.amazonaws.com/index.html?prefix=bin/circuitplayground_express_displayio/en_US/)
## Required CircuitPython Libraries

To use this display with `displayio`, there are only two required libraries.

First, make sure you are running the&nbsp;[latest version of Adafruit CircuitPython](https://learn.adafruit.com/welcome-to-circuitpython/installing-circuitpython)&nbsp;for your board.

Next, you'll need to install the necessary libraries to use the hardware Carefully follow the steps to find and install the library from [Adafruit's CircuitPython library bundle](https://github.com/adafruit/Adafruit_CircuitPython_Bundle).&nbsp; Our introduction guide has&nbsp;[a great page on how to install the library bundle](https://learn.adafruit.com/welcome-to-circuitpython/circuitpython-libraries) for both Express and non-Express boards.

Due to the number of libraries in the bundle, it is recommended that you manually install the necessary library from the bundle:

- **adafruit\_st7789**
- **adafruit\_gizmo**

Before continuing make sure your board's **lib** folder has the **adafruit\_st7789.mpy** and **adafruit\_gizmo** file and folder copied over.

## Code Example Additional Libraries

For the Code Example, you will need an additional library. We decided to make use of a library so the code didn't get overly complicated. You'll also need to copy over the following library from the bundle:

- **adafruit\_display\_text**

Go ahead and install this in the same manner as the driver library by copying the&nbsp; **adafruit\_display\_text** folder over to the **lib** folder on your CircuitPython device.

## CircuitPython Code Example
https://github.com/adafruit/Adafruit_CircuitPython_Gizmo/blob/main/examples/gizmo_tft_demo.py

Let's take a look at the sections of code one by one. We start by importing `displayio`,`terminalio` for the font, a `label`, and the&nbsp;`tft_gizmo` helper.

```python
import displayio
import terminalio
from adafruit_display_text import label
from adafruit_gizmo import tft_gizmo
```

Next, we initialize the helper, which takes care of all the TFT Gizmo ST7789 Driver initialization for us.&nbsp;If we stopped at this point and ran the code, we would have a terminal that we could type at and have the screen update.

```python
display = tft_gizmo.TFT_Gizmo()
```

![](https://cdn-learn.adafruit.com/assets/assets/000/081/930/medium800/express_gizmo_repl.jpeg?1570120803)

Next we create a background splash image. We do this by creating a group that we can add elements to and adding that group to the display. In this example, we are limiting the maximum number of elements to 10, but this can be increased if you would like. The display will automatically handle updating the group.

```auto
splash = displayio.Group(max_size=10)
display.root_group = splash
```

Next we create a Bitmap which is like a canvas that we can draw on. In this case we are creating the Bitmap to be the same size as the screen, but only have one color. The Bitmaps can currently handle up to 256 different colors. We create a Palette with one color and set that color to 0x00FF00 which happens to be green. Colors are Hexadecimal values in the format of RRGGBB. Even though the Bitmaps can only handle 256 colors at a time, you get to define what those 256 different colors are.

```auto
color_bitmap = displayio.Bitmap(240, 240, 1)
color_palette = displayio.Palette(1)
color_palette[0] = 0x00FF00 # Bright Green
```

With all those pieces in place, we create a TileGrid by passing the bitmap and palette and draw it at&nbsp;`(0, 0)`&nbsp;which represents the display's upper left.

```auto
bg_sprite = displayio.TileGrid(color_bitmap,
                               pixel_shader=color_palette,
                               x=0, y=0)
splash.append(bg_sprite)
```

![](https://cdn-learn.adafruit.com/assets/assets/000/081/931/medium800/express_gizmo_green.jpeg?1570120853)

Next we will create a smaller purple square. The easiest way to do this is the create a new bitmap that is a little smaller than the full screen with a single color and place it in a specific location. In this case, we will create a bitmap that is 20 pixels smaller on each side. The screen is **240x240** , so we'll want to subtract 40 from each of those numbers.

We'll also want to place it at the position&nbsp;`(20, 20)` so that it ends up centered.

```auto
inner_bitmap = displayio.Bitmap(200, 200, 1)
inner_palette = displayio.Palette(1)
inner_palette[0] = 0xAA0088 # Purple
inner_sprite = displayio.TileGrid(inner_bitmap,
                                  pixel_shader=inner_palette,
                                  x=20, y=20)
splash.append(inner_sprite)
```

Since we are adding this after the first square, it's automatically drawn on top. Here's what it looks like now.

![](https://cdn-learn.adafruit.com/assets/assets/000/081/932/medium800/express_gizmo_purple.jpeg?1570120909)

Next let's add a label that says "Hello World!" on top of that. We're going to use the built-in Terminal Font and scale it up by a factor of two. To scale the label only, we will make use of a subgroup, which we will then add to the main group.

Labels are centered vertically, so we'll place it at 120 for the Y coordinate, and around 50 pixels make it appear to be centered horizontally, but if you want to change the text, change this to whatever looks good to you. Let's go with some yellow text, so we'll pass it a value of `0xFFFF00`.

```auto
text_group = displayio.Group(max_size=10, scale=2, x=50, y=120)
text = "Hello World!"
text_area = label.Label(terminalio.FONT, text=text, color=0xFFFF00)
text_group.append(text_area) # Subgroup for text scaling
splash.append(text_group)
```

Finally, we place an infinite loop at the end so that the graphics screen remains in place and isn't replaced by a terminal.

```auto
while True:
    pass
```

![](https://cdn-learn.adafruit.com/assets/assets/000/081/933/medium800/express_gizmo_hello_world.jpeg?1570120921)

## Where to go from here

Be sure to check out this excellent&nbsp;[guide to CircuitPython Display Support Using displayio](https://learn.adafruit.com/circuitpython-display-support-using-displayio)

# Adafruit Circuit Playground TFT Gizmo

## Downloads

## Files

- [EagleCAD files for Circuit Playground TFT Gizmo on GitHub](https://github.com/adafruit/Adafruit-TFT-Gizmo-PCB)
- [Fritzing object in the Adafruit Fritzing Library](https://github.com/adafruit/Fritzing-Library/blob/master/parts/Adafruit%20Circuit%20Playground%20TFT%20Gizmo.fzpz)
- [3D Model on Github](https://github.com/adafruit/Adafruit_CAD_Parts/tree/master/4367%20TFT%20Gizmo)

![](https://cdn-learn.adafruit.com/assets/assets/000/082/464/medium800thumb/express_tft-gizmo.jpg?1571253700)

## Schematic for Circuit Playground TFT Gizmo
![](https://cdn-learn.adafruit.com/assets/assets/000/081/954/medium800/express_tft_gizmo_schematic.png?1570143243)

## Fab Print
![](https://cdn-learn.adafruit.com/assets/assets/000/081/940/medium800/express_tft_gizmo_fab_print.png?1570131130)


## Primary Products

### Circuit Playground TFT Gizmo - Bolt-on Display + Audio Amplifier

[Circuit Playground TFT Gizmo - Bolt-on Display + Audio Amplifier](https://www.adafruit.com/product/4367)
Extend and expand your Circuit Playground projects with a bolt on TFT Gizmo that lets you add a lovely color display in a sturdy and reliable fashion. This PCB looks just like a round TFT breakout but has permanently affixed M3 standoffs that act as mechanical and electrical...

In Stock
[Buy Now](https://www.adafruit.com/product/4367)
[Related Guides to the Product](https://learn.adafruit.com/products/4367/guides)

## Guide Products

### Circuit Playground Bluefruit - Bluetooth® Low Energy

[Circuit Playground Bluefruit - Bluetooth® Low Energy](https://www.adafruit.com/product/4333)
 **Circuit Playground Bluefruit** is our third board in the Circuit Playground series, another step towards a perfect introduction to electronics and programming. We've taken the popular Circuit Playground Express and made it even better! Now the main chip is an nRF52840...

Out of Stock
[Buy Now](https://www.adafruit.com/product/4333)
[Related Guides to the Product](https://learn.adafruit.com/products/4333/guides)
### Circuit Playground Express

[Circuit Playground Express](https://www.adafruit.com/product/3333)
 **Circuit Playground Express** is the next step towards a perfect introduction to electronics and programming. We've taken the original Circuit Playground Classic and made it even better! Not only did we pack even more sensors in, we also made it even easier to...

Out of Stock
[Buy Now](https://www.adafruit.com/product/3333)
[Related Guides to the Product](https://learn.adafruit.com/products/3333/guides)

## Related Guides

- [Adafruit Circuit Playground Express](https://learn.adafruit.com/adafruit-circuit-playground-express.md)
- [Adafruit Circuit Playground Bluefruit](https://learn.adafruit.com/adafruit-circuit-playground-bluefruit.md)
- [SpaceX Helmet](https://learn.adafruit.com/spacex-helmet.md)
- [Snow Globe with Circuit Playground Bluefruit](https://learn.adafruit.com/snow-globe-bluefruit-cpb.md)
- [Scratch 3 Walkthrough and Demo](https://learn.adafruit.com/guide-to-scratch-3.md)
- [CircuitPython Snow Globe](https://learn.adafruit.com/circuitpython-snow-globe.md)
- [TFT Gizmo Turtle](https://learn.adafruit.com/tft-gizmo-turtle.md)
- [Steven Universe Cosplay Shirt & Gem](https://learn.adafruit.com/steven-universe-cosplay-shirt-gem.md)
- [Buttermilk Boat with Circuit Playground Express](https://learn.adafruit.com/boat-with-circuit-playground-express.md)
- [Datalogging and File Storage in MakeCode](https://learn.adafruit.com/data-logging-and-file-storage-in-makecode.md)
- [Make It Log](https://learn.adafruit.com/make-it-data-log-spreadsheet-circuit-playground.md)
- [Make It Talk](https://learn.adafruit.com/make-it-talk.md)
- [UFO Flying Saucer with Circuit Playground Express](https://learn.adafruit.com/ufo-circuit-playground-express.md)
- [Circuit Playground Express Rocket Lamp](https://learn.adafruit.com/cpx-rocket-lamp.md)
- [NYE Circuit Playground Drop](https://learn.adafruit.com/nye-circuit-playground-drop.md)
- [How to Choose a Microcontroller](https://learn.adafruit.com/how-to-choose-a-microcontroller.md)
- [Cyberpunk Santa Eye](https://learn.adafruit.com/cyberpunk-santa-eye.md)
