Can Only Draw Dots Touch Screen
Components and supplies
Nearly this project
Before starting this project...
This project involves withal some other Arduino-uniform brandish which tin can be used as an output to display any information in the form of graphics, text or animations. Since this is a 1.3" 240x240 IPS (In-Airplane Switching) TFT display module, it does offer a high-resolution colour display with fine graphics, and that is one of the things which I really enjoy about this brandish. It is also very easy to program, as it runs on the STT789 display, which is helpful to know, equally the Adafruit ST7789 library supports this brandish, and is what we volition be using today. The code used below is a fairly complex lawmaking at first, which showcases this display'south capabilities and what it can do, in terms of functionality. For the wiring, a 6-pin wiring configuration is used with the SPI interface to the Arduino, which will exist shown below. Finally, for this project, hither are the components which you volition need:
- i 1.3" 240x240 IPS TFT Brandish Module
- vi Jumper Wires (Male person to Female)
- 1 Arduino (the Seeeduino v4.ii is used in this case)
- 1 USB Information Cable (depends on the Arduino)
UTSource.net Reviews
It is a trustworthy website for ordering electronic components with inexpensive price and excellent quality.
Mounting the excursion
This project is adequately straightforward to set so make sure you start by unplugging whatsoever power source feeding into your Arduino to prevent whatsoever shorts while wiring. Firstly, accept a jumper wire and connect the GND pin on the brandish to any of your Arduino'due south GND pins and follow that upwardly by connecting the VCC pin from the brandish to the 3v3 pin of your Arduino to supply a +iii.iii volt ability supply to the module. +5v volition have a possibility to damage the display. Now, for the i2c connections, hook up the SCL (Serial Clock) pin of the display to A13 (analog pivot xiii) on the Arduino and the SDA (Serial Data) pivot to A11 (analog pin xi). For the RES (Reset) pivot, connect it up to A8 (analog pivot viii) likewise equally the DC (Information/Command) pin to A9 (analog pivot 9). The hardware function is finally done!
About the code
This code may seem slightly intimidating at first, due to its length and much newer functions, but once information technology is cleaved downward, information technology isn't and then difficult anymore. In the first 3 lines, nosotros declare libraries for running this brandish, the graphics used, and for the interface used, which is the SPI interface. In the next three lines, the RST (Reset) and DC (Data/Control) pins are defined, which are connected to A8 (analog pin eight) and A9 (analog pin 9). In the next line, nosotros initialize the Adafruit ST7789 library for use with this display and we follow that by defining the value of pi as a bladder variable in that next line. We will be using this bladder variable later on for graphics and calculations needed. The void setup section is now here where we first start by begining serial communication with a baud charge per unit of 9600 bauds and printing a test message which is "Hello! ST7789 TFT Examination!". In regards to the brandish, we address that our display module is of 240x240 resolution and we set up the rotation of our display in the adjacent line. If your brandish is flipped, remove tft.setRotation(two) . From there, we print the text "Initialized" as our display is now correctly fix. Later on that, we count up the seconds from the startup with the millis() function and store it in an unsigned 16-bit integer, named time , for use later. We and then make full up the TFT screen with a blackness colour. Since we already started the stopwatch which counts up, we can e'er reset the stopwatch back to nix by using subtracting the time office with the millis() . To terminate off this section, we set a filibuster for 500 milliseconds earlier moving on. This section onwards volition only be for the animations, graphics and images displayed on the screen, and we commencement off by filling the screen with a black background and writing some text with a white colour earlier a one-2d filibuster. Proceeding that, we execute a print test which basically is already programmed to print out a set of text in unlike font colours and sizes. We terminate this test by setting a delay for 4 seconds. From this bespeak, the rest of the lawmaking is responsible for printing out the different graphics, which tin can be equanimous of shapes, pixels and text. All the different graphics and its individual code are mentioned at the end of the code so I recommend really going through this plan to larn all the commands, which can help yous build your ain demo lawmaking, even with your own personal images being displayed. This project is now done!
Astonishing opportunities
Also, exist certain to check out PCBWay, a leading manufacturer and distributor in PCB design and manufacturing. They have amazing prices and fantabulous quality in their services, so don't miss out on them! Plus, PCBWay has an amazing website, online Gerber viewer office and a gift shop so make sure to check out their links below:
PCBWay Free Online Gerber Viewer Function: https://www.pcbway.com/project/OnlineGerberViewer.html
PCBWay Souvenir Shop: https://world wide web.pcbway.com/projection/gifts.html
Bask! Contact us for whatsoever inquiries!
Lawmaking
Schematics
Source: https://create.arduino.cc/projecthub/infoelectorials/project-020-arduino-1-3-ips-tft-display-project-d7a6ee
Posted by: galelecought.blogspot.com

0 Response to "Can Only Draw Dots Touch Screen"
Post a Comment