Description
DWIN-HMI specialized in making High quality and cost effective HMI touch screens display.
In this tutorial, I am going to make a LED controller with the help of STM32 Here I have used just LEDs for output purpose. Let’s start with it and stay tune here to get the more solution/projects of Dwin-HMI display.
This DMG80480C043_02WTC has resolution of 480X800 and can be easily used with 5V compatible controller boards like Arduino Uno, Arduino Nano, Arduino Mega, STM32, PIC microcontrollers, 8051 family of microcontrollers, etc.
Tool Installation
For tool installation, I already explained in the first tutorial of Dwin-HMI you can check this by clicking on given link. And this is require to proceed further so please check it, how to install the tools, then you can proceed further in this project to design GUI as you saw in the output video/YouTube so go through first Tutorial which is given below.
GUI Designing
Step1 :- First you have to make a new folder then go in GUI tool and click on new project and give the path of this project. Then convert that image which we are going to use for GUI, with the help of inbuilt tool “Picture conversion” . At the time of converting images give the path of Project folder.
Step2 :- After converted images you have to make ICL file of every images and icons and then save these file in DWIN_SET folder with the name starting from 32..33…34……..64 and so on this is the rule, because memory is divided in different section so you have to name like this only, you can see ICL tool in below image through this you have to make ICL file.
As, in this we have icons & image so, I have made two ICL files and these file are saved in the DWIN_SET folder as you can see in below image. Now you can see all these two files are ready in DWIN_SET folder.
Step 3:- Now you need to add background image to move forward in GUI , it will look like this as you can see in the below image.
As you can see in the above image there are three LEDs here we need to add button which will help to On/off the LEDs. Let’s add those widgets here, for this go in display control and drag “Var icon” widget from there add this widget three time as we have three LEDs here, you can follow below image for this.
And here important part is that VP address we need to give it proper for every button, you can see in my case it is 5200 and it is going to be change for each button. After this we need to add Button action on button images. For this go in Touch control and drag the “Increment Adjustment” widget from there as you can see in the below image.
Similarly add for all the buttons. And give the VP address respect to button also. Now we have completed the GUI design for this project then we need to save and click also on generate button as I have done in below image.
If you have any difficulties in this you can use my project file which I have used in the same. The link is given below, here you will find the Code, Images & Project file.
Circuit & STM32 Code
Circuit-Diagram
Find the whole STM code below. This code has many files, so you need to be careful at the time of opening it & you need to open it in STM CudeIDE software. You can download it from website of STM. Below all files are given you can find here circuit, code and project file also included.
Frame[8]={0x5a, 0xa5, 0x05, 0x82, sensor_H, sensor_L, 0x00, 0x00 } this is the frame which display is sending for any command, and here sensor_L & sensor_H is the address for that particular widget.
And this is the frame which I am receiving from HMI-Display at the time of pressing the any button. And this frame is passing through a switch case statement for particular button you can find the details in the code.
Testing/Output
Here is the output video you can see it for reference and if you are facing any difficulties you can watch the YouTube video, link is given below please find that. Or if you have any doubt please ask in comment section, I will try to give answer as soon as possible. And for any product query reach to those contacts which are given below.
For this product or other product you can contact Dwin-HMI supplier or their Team, contact details are given for any query related with Product, please reach to them if you have any.