|
CrowPanel 2.8 |
x 1 | |
|
ds18b20 waterproof temperature sensor |
x 1 | |
|
RGB LED Breakout - WS2812B |
x 1 |
|
Soldering Iron Kit |
|
|
arduino IDEArduino
|
ELECROW Crow Panel 2.8-ESP32 HMI Display - simple TFT_eSPI examples
These days I received a shipment from Elecrow that contains several components that I ordered a week ago. My shipment arrived unexpectedly quickly, and is well packed and protected in a branded box. It consists of Crow Panel 2.8" HMI 320x240 display SPI TFT LCD Touch screen compatible with Arduino, LVGL Library, and ESP microcontroller onboard with all necessary cables and touch pen.
These are laser machined housing parts for this ESP32 Display, then a waterproof temperature sensor and a BME 280 sensor board. The sensors contain appropriate cables that are compatible with the Display board, so that when making a project there is no need for soldering, and there is also no possibility of wrong connection. When the board is turned on for the first time, a demo application appears on the display to demonstrate some of the capabilities of this small device. After assembling the case, the display looks tidy and is protected from damage.
On Elecrow's site you can find a lot of detailed information and tutorials about this display module using the LVGL library and Square Line Studio software, which drastically simplify the creation of the graphical environment without writing code. This time, my idea was to explain to you how to use this module to create simple code yourself using the TFT-Espi library, which is very often represented in DIY projects.
I will only use Arduino IDE to write code and upload it to the board. I will also explain how to control external components, specifically an LED as the simplest example.
First we need to enable display module in the Arduino environment. For this purpose we go to Arduino IDE - File - Preferences - where we add the ESP32 URL to "Board Manager URLs" as follows:
(https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json)
Now click "Tool-->Board-->Board Manager", and search for "esp32". It is recommended to
install version 2.0.3 ESP32 package.
Next we go to Sketch-> Include Library-> Manage Libraries -> TFT_eSPI -> Install
After that "User_Setup.h" in "" library folder needs to be modified according to their screen drive. For this purpose, we copy the "User-Setup.h" file given below, to the "TFT_eSPI" library folder, replacing the original file
Now, on Arduino IDE -> Tools -> Boards manager -> ESP32 Arduino we choose: ESP32-WROOM-DA Module, and set the parameters as given in the image
With this, the procedure for entering support for the specific Display Мodule in the Arduino IDE is completed.
Since TFT_eSPI library is customized for this display module, we can now successfully upload code from some previous projects that use it. Of course, a huge advantage is that there is no need for any soldering, especially if we use Elecrow sensors and modules, and the display together with the microcontroller is small, compact, and housed in a nice case. First I will test the device with test examples that are provided in the library itself. For this purpose I go to Examples - TFT_eSPI - and select an example. Then select the appropriate port and upload the code.
and now, another example
As I mentioned above in the text, next I will describe to you a simple example of how to control an LED. For this purpose, on the two input-output pins (IO25 and IO32) of the display I will connect two colors from the RGB LED module through 220 Ohm current limiting resistors. To simplify the code, we need to install the TFT_eWidget library which contains ready-made buttons, gauges or graphs, and also tft_setup library.
Here is what the finished project looks like with the uploaded code, which you can download from the given link. Pressing the buttons turns the LEDs of the corresponding color on and off.
This is an example where we use ports 25 and 32 as outputs and with them we can control certain processes.
Next I will present you another simple example where one of these ports (25) is used as an input, and on it we can read the information generated by the temperature sensor. The display shows the current temperature in degrees Celsius.
You can also download the code and schematic for this project at the link given at the end of the project.
And finally, a short conclusion.
This time I tried to explain to you first how to install this nice display module in Arduino IDE, and then to make some simple projects using TFT-eSPI library which is very often used for various projects with graphic environment. In some of my next videos I will show you how to install some more complex useful code on this compact module.
ELECROW Crow Panel 2.8-ESP32 HMI Display - simple TFT_eSPI examples
- Comments(0)
- Likes(0)
- 0 USER VOTES
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
More by Mirko Pavleski
- Simple ESP32 CAM Object detection using Open CV Object detection is a computer vision technique that involves identifying and locating objects with...
- Arduino OPLA IoT Kit blink_ Example and Symon Says Game The Arduino Opla IoT Kit is a versatile kit designed for creating and managing Internet of Things ...
- How to make Simplest and Cheapest compact Internet Radio - Yoradio Internet radio is a digital audio service that streams music, news, and other forms of audio conten...
- DIY Simple STM32 Virtual Electronic Finderscope (Stellarium Compatible) A finderscope is a small auxiliary telescope mounted on the main telescope to help locate and cente...
- Simple TEF6686 DSP AM FM tuner with ESP32 microcontroller The TEF6686 radio module is intended for AM/FM receivers for cars. This miniature module has amazin...
- ELECROW Crow Panel 2.8-ESP32 HMI Display - simple TFT_eSPI examples These days I received a shipment from Elecrow that contains several components that I ordered a wee...
- DIY Advanced Theremino Sonar Theremino is an open-source platform designed for hobbyists and makers, providing a versatile framew...
- Single Mosfet - Class E - Solid State Tesla Coil A Solid State Tesla Coil (SSTC) is a type of Tesla coil that uses solid-state components such as tr...
- DIY Ultra Sensitive Theremino-Arduino Polygraph, Scientology E-Meter A polygraph, commonly known as a lie detector, is a device used to measure and record several physi...
- DIY addictive Arduino 1D Pong game Pong is a table tennis–themed 2 dimensional graphics arcade video game manufactured by Atari and or...
- DIY Analog VU meter with Arduino peak meter An analog VU meter, or Volume Unit meter, is a device used in audio equipment to display the level o...
- DIY simple Capacitive Proximity sensor A capacitive proximity sensor is a type of sensor used to detect the presence of an object without p...
- How to make Arduino Morse Code Generator Morse code is a method used in telecommunication to encode text characters as standardized sequenc...
- DIY Arduino Morse code Decoder and Trainer The Morse Code is a language that people use to communicate with each other through telegraph, radi...
- Dual MOT (microwave oven transformer) Tesla Coil Tesla coils are known for their ability to generate visually impressive electrical arcs or sparks, ...
- ESP2866 controlled 8x32 matrix WS2812 Leds (Awtrix project) The WS2812B is a individually addressable RGB LED that allows you to control each LED's color and b...
- How to make simplest possible autorange Capacitance meter The capacity measurement option is usually only available in more expensive multimeters, so it is d...
- How to turn mini Tesla Coil from Aliexpress into a Real Powerful SSTC with big spark Some time ago I bought a mini tesla coil kit from an online store that cost less than $4. It's a ve...