Skip to content
If this is your first visit, please click here to learn about shipping and delivery.
If this is your first visit, please touch here to learn about shipping and delivery.
Compact 1.8-inch colour TFT display module for Arduino Esplora

Make a Small SPI TFT Dashboard Responsive: Colour, Redraws and Timing

A small TFT screen can display a polished dashboard without complex animation. The challenge is keeping its readings clear and its controls responsive while pixels travel over a serial bus. A fast-looking demonstration does not show what happens when the same microcontroller also reads sensors, opens files and handles buttons.

The TFT colour LCD module collection includes different panel sizes and interfaces. PMD Way's 1.8-inch 128 × 160 TFT for Arduino Esplora provides a compact example with an SPI display and microSD socket. Check the supplied module's connection and voltage documentation before adapting it to another host board.

Separate the screen from the information

Begin with a list of information rather than a drawing routine. A workshop monitor might need a measured temperature, a target, an operating state and a fault message. Decide which values change frequently and which remain static. The title, units and border can usually be drawn when entering the page; the current measurement needs a smaller, repeated update.

Create a record for the visible state. Include both values and their validity: an unavailable measurement should produce an explicit marker, not silently retain yesterday's number. Keep control decisions outside the renderer. The display should describe the project, while the project's main logic remains responsible for sensing and operation.

Understand what colour costs

RGB565 stores red, green and blue using five, six and five bits respectively, giving two bytes per pixel. The ST7735S controller datasheet supplied by Newhaven Display documents this colour format. This is a reference example; select the driver and pixel format appropriate to the controller actually fitted to your module.

A 128 × 160 image at two bytes per pixel contains 40,960 bytes. A 320 × 240 image contains 153,600 bytes. Those calculated sizes explain why a full host-side framebuffer can be impractical on a small microcontroller. They do not mean the host must store the complete image: a suitable library can send drawing operations or pixel regions to the display controller.

Colour precision also affects artwork. An image exported with an arbitrary 24-bit format is not automatically ready to send as RGB565. Check the library's supported file format, byte order and conversion procedure. Use a known test image before assuming a corrupted picture indicates an electrical problem.

Measure a useful lower bound

Imagine sending the entire 40,960-byte image through an eight-bit serial transfer at a hypothetical 8 MHz clock. The pixel payload contains 327,680 bits and needs at least 40.96 milliseconds. Commands, software overhead, chip-select handling and any storage reads add time. This is arithmetic for planning, not an approved clock setting for every display.

A 64 × 24 field contains 1,536 pixels, or 3,072 bytes in RGB565. At the same hypothetical clock its pixel payload needs 3.072 milliseconds. Redrawing a small changing field can therefore reduce traffic substantially. Measure the actual library operation because many individual pixel calls can introduce far more overhead than one contiguous region transfer.

Time the complete update while the rest of the application is active. Record typical and longest observed durations, especially during card access. A dashboard that updates in bursts may feel worse than one refreshed less often but with predictable response to buttons.

Erase old values without clearing everything

When a number changes from 100 to 99, drawing the new digits over the old ones can leave an unwanted zero. Reserve a fixed rectangular field large enough for every valid value, including a minus sign and decimal point. Restore that field's background and then draw the new text using a consistent position.

The official Arduino TFT text example demonstrates removing previous text before replacing it. In your own layout, consider what is behind the text. Painting a solid rectangle is suitable over a solid background; it can erase graph lines or decorations if they share the same area.

For a simple dashboard, deliberately keep changing numbers on plain backgrounds. Store the previous displayed value and skip an update when the formatted result is unchanged. If a sensor changes from 21.241 to 21.244 but the screen shows one decimal place, there may be no visible work to perform.

Prove orientation and colour before artwork

  1. Display separate red, green, blue, white and black regions.
  2. Label all four corners and draw a border just inside the usable screen.
  3. Check the reported width and height after the intended rotation.
  4. Draw a short horizontal and vertical scale to expose offsets or clipping.
  5. Load a small known image only after generated shapes and text look correct.

If red and blue appear exchanged, check the controller's colour-order configuration and the library's colour argument order. If colours become nonsensical only in imported images, investigate conversion and byte order. If one edge is clipped, verify geometry and driver offsets before moving every widget to hide the symptom.

The official Arduino TFT guide covers the original screen's graphics and image workflow. Treat its wiring as specific to that hardware and host combination; similar-looking displays can have different electrical arrangements.

Share the bus with storage carefully

A display and microSD card may share SPI signals while using separate chip-select controls. Confirm the actual module's wiring and let compatible libraries manage their own device settings. Arduino's SPI reference provides the starting point for transaction-aware communication.

Test the display alone, then a small card read, then both together. If the screen fails only after storage is added, inspect selection handling, bus settings and library compatibility. Avoid refreshing a decorative full-screen bitmap on every measurement. Load static artwork when changing pages and retain a simpler update path for live values.

Review the interface at its actual size

Use the real screen at the intended viewing distance. A layout that looks excellent enlarged on a computer can have unreadable units or indistinguishable warning colours on a small panel. Pair colour with text or a clear symbol so the state remains understandable without recognising a particular hue.

Finally test the longest label, negative readings, disconnected sensors and rapid input changes. Keep the diagnostic colour screen and a timing log with the project. A successful dashboard presents fresh, understandable information while leaving enough time for the rest of the system to work.

Previous article Battery Power for Arduino Projects: Voltage Range, Runtime and Regulator Heat