Skip to main content

2.4-inch TFT Display(EF04110)

Introduction

The 2.4-inch TFT display is a high-performance color screen specially designed for educational scenarios. With its excellent color performance and high-resolution image display capabilities, this display brings a vivid visual experience to your projects. It comes with built-in chart templates such as line charts, pie charts, and bar charts, making your data presentation more intuitive and professional.

Features

  • Color display: Rich colors and clear images.
  • Graphic and text display: Whether it's complex graphics or clear text, our display can easily present them, meeting your needs for visual information presentation.
  • Built-in chart templates: To simplify the data visualization process, we have built-in various chart templates such as line charts, pie charts, and bar charts, making your data presentation more intuitive and professional.

Specifications

ItemParameter
Product Name2.4-inch TFT Display
SKUEF04110
Screen Resolution320*240 (RGB)
Operating Voltage3.3V - 5V
Operating Current60mA
Connection ModeIIC
Dimensions72mm (Length) x 68mm (Width) x 8mm (Height)
Net Weight23g (excluding packaging)

Appearance and Positioning Dimensions

Quick Start

Hardware Connection

Connect the 2.4-inch TFT display to the IIC interface of the iot:bit.

Software Programming

Add Extension

Add the extension https://github.com/ZY2516/tft_lcd to MakeCode.

Block Definition

CategoryBlockFunction Definition
BasicTurn on or off the backlight
Clear the screen display content
Set the background color to a preset color
Set the brush/font color
Clear the content of the first line
Display text information on the Nth (1 - 8) line
Display numerical information on the Nth (1 - 8) line
Display text information at the specified coordinates (X: 0 - 320, Y: 0 - 240)
Display numerical information at the specified coordinates (X: 0 - 320, Y: 0 - 240)
GraphicsSet the starting and ending points of a line and draw the line
Set the starting and ending points of the diagonal of a rectangle, whether to fill it, and draw the rectangle
Set the center, radius, and whether to fill a circle and draw the circle
Draw an arc loader and set its background color
Display a progress bar
ChartsDraw a bar chart/line chart and initialize its data domain, number of columns, color, and label of each group of data
Set the label name and data input of each column of data in the bar chart/line chart
Draw a pie chart and set its data, labels, and colors

Example Programs

Set Background Color and Brush Color Program code link: https://makecode.microbit.org/_1qggm50bD4Rk You can also directly download the code through the following window:

Result After pressing button A, display the text "A" and a random number (0 - 9) at a random position.

Display Numbers and Text Program code link: https://makecode.microbit.org/_PF5Ym1a0e45M You can also directly download the code through the following window:

Result After power-on, display the text "A" on the first line and the number 0 on the second line.

Draw Lines, Circles, and Rectangles Program code link: https://makecode.microbit.org/_57hLj6aTA2ap You can also directly download the code through the following window:

Result After pressing button A, draw a straight line; After pressing button B, draw a rectangular frame; After pressing the logo, draw a filled circle.

Draw an Arc Loader Program code link: https://makecode.microbit.org/_FqYiqfL3y0VL You can also directly download the code through the following window:

Result After pressing button A, draw an arc loader.

Draw a Progress Bar Program code link: https://makecode.microbit.org/_hxcfvg22vWmL You can also directly download the code through the following window:

Result After pressing button A, draw a progress bar.

Draw a Line Chart Program code link: https://makecode.microbit.org/_Wqr0fTKvE4ua You can also directly download the code through the following window:

Result After pressing button A, draw a line chart.

Draw a Bar Chart Program code link: https://makecode.microbit.org/_bj5eqf16kXjY You can also directly download the code through the following window:

Result After pressing button A, draw a bar chart.

Draw a Pie Chart Program code link: https://makecode.microbit.org/_4C9Jq2efHDC2 You can also directly download the code through the following window:

Result After pressing button A, draw a pie chart.

Overall Test Program Program code link: https://makecode.microbit.org/_7rXKwwR6JgLK You can also directly download the code through the following window:

Result

Each time you press button A, the display function will switch:

  • Function 1: Display lines, rectangles, circles, and text.
  • Function 2: Display a bar chart.
  • Function 3: Display a line chart.
  • Function 4: Display a pie chart.
  • Function 5: Display a progress bar.
  • Function 6: Display a loading graph. After pressing the logo, randomly switch the background color and brush color.