This video explains how to display FLOAT values on DWIN display.
The float values are multiplied by 100 and converted to Integer value in code.
In DWIN display DATA VARIABLE is used of variable type INTEGER and decimal places set to 2.
With this simple trick , we can display the actual float values.
Code & Project download :
https://www.alselectro.in/product-pag...
The code uses three arrays of bytes to store the protocol for each variable: Temperature, TemperatureF, and Humidity. Each array has 8 elements, as follows:
The first two elements are 0x5A and 0xA5, which are fixed header bytes that indicate the start of a data packet.
The third element is 0x05, which is the length of the data packet (excluding the header bytes).
The fourth element is write 0x82, which is a command byte that indicates that data is being sent to a vp address on the display.
The fifth element is a hex value that corresponds to the address of the vp of the display. For example, 0x52 is the address of temp, 0x51 is the address of tempF, and 0x50 is the address of humidity.
The 7th and 8th element (index 6 & 7) are replaced with High byte and Low byte of actual data.
Finally Serial.Write() function is used to write data on to display.
Watch video #26 DWIN HMI - How to display Float Values online, duration hours minute second in high quality that is uploaded to the channel Saravanan AL 06 October 2023. Share the link to the video on social media so that your subscribers and friends will also watch this video. This video clip has been viewed 5,075 times and liked it 63 visitors.