I want to display real time curved graph on Dwin display

Hello, I'm working on dwin display with arduino mega and Max6675 temperature sensor. I need some help to show graph on DWIN display.
I want to show arduino sensor data on DWIN display with graph.
Can anyone please help me to solve this issue?

I am confused between VP and SP

Please post the datasheet for the display, schematics and code so far.

Ok will be update soon sir

when recently testing a heat pump I implemented a real time display of room temperature (DS18B20 temperature Sensor) vers time on a ESP32 WIFI Bluetooth Development Board 2.8" LCD TFT Touch Screen Module
e.g. plot over 3 to 4 days

the data was saved to an SD card for later display on a PC using a program implemented in C# (showing heat pump ON/OFF time and settings)

do you know the X and Y range in advance and how many data points you will have?
if you know this information it is fairly straight forward to map the data onto the display and plot it at a point at a time
if not one has to redraw the display changing axes as required - this means you have to store the data - easy on an ESP32 with SRAM: 520 KB but more difficult on a Mega with SRAM: 8KB

Thx for sharing experience with me but i want to do with specify Dwin display 7 inch capacitive touch for my embedded system is bonding machine, so need help to deal with it,

Thx again



MY display numbers and dash board when i want to show curved

Datasheet-DMG80480C070_04W.zip (4.3 MB)
MY DISPLAY DATASHEET

#include <max6675.h> // Include the MAX6675 library

// MAX6675 Thermocouple Pin Connections
int thermoDO = 41;
int thermoCS = 39;
int thermoCLK = 37;

// Initialize MAX6675 thermocouple
MAX6675 thermocouple(thermoCLK, thermoCS, thermoDO);

// Variable to store current temperature
int curent_temp;

// Function to send temperature data to the curve graph
void sendTemperatureToGraph() {
// Read temperature from thermocouple
curent_temp = (int)thermocouple.readCelsius();

// Prepare the curve graph command
byte curve_graph[16] = {
0x5A, 0xA5, // Frame header
0x0D, // Data length (13 bytes)
0x82, // Write instruction
0x99, 0x00, // VP address (0x9900)
0x5A, 0xA5, // Start curve buffer writing operation
0x01, 0x00, // Number of curve data blocks (1 block)
0x00, 0x02, // Channel 0, 2 data words
highByte(curent_temp), lowByte(curent_temp), // Temperature value (high and low bytes)
0x00, 0x00 // Placeholder for second data point (optional)
};

// Print the command to Serial Monitor for debugging
Serial.println("Sending Command to DWIN Display:");
for (int i = 0; i < 16; i++) {
Serial.print("0x");
if (curve_graph[i] < 0x10) Serial.print("0"); // Add leading zero for single-digit hex values
Serial.print(curve_graph[i], HEX);
Serial.print(" ");
}
Serial.println();

// Send the command to the DWIN display
Serial1.write(curve_graph, 16);

// Wait for a response from the DWIN display
delay(100); // Adjust delay based on response time
if (Serial1.available()) {
Serial.println("Response from DWIN Display:");
while (Serial1.available()) {
char response = Serial1.read();
Serial.print("0x");
if (response < 0x10) Serial.print("0"); // Add leading zero for single-digit hex values
Serial.print(response, HEX);
Serial.print(" ");
}
Serial.println();
} else {
Serial.println("No response from DWIN Display.");
}

// Print temperature to Serial Monitor for debugging
Serial.print("Temperature: ");
Serial.print(curent_temp);
Serial.println(" °C");

// Delay for stability
delay(500); // Increased delay to 500ms for better graph updates
}

void setup() {
// Initialize Serial Monitor for debugging
Serial.begin(9600);

// Initialize Serial1 for communication with DWIN display
Serial1.begin(115200);

// Wait for MAX6675 to stabilize
delay(500);

Serial.println("Initialization complete. Starting temperature readings...");
}

void loop() {
// Send temperature data to the DWIN display
sendTemperatureToGraph();
} THIS IS MY TEST CODE

T5L_DGUSII-Application-Development-Guide-V2.8-0914.pdf (7.5 MB)
THIS IS DEVLOPMENT GUIDE

the code is unreadable at the moment - format your code presentation by using code tags, e.g. click < CODE > and paste you code where it says 'type or paste code here

do you know the X and Y range in advance and how many data points you will have?
if you know this information it is fairly straight forward to map the data onto the display and plot it at a point at a time

what appears on the serial monitor and the display when you run the code?

// Function to send fixed temperature data to the curve graph
void sendFixedTemperatureToGraph() {
// Fixed temperature value (e.g., 200°C)
int fixed_temp = 200;

// Prepare the curve graph command
byte curve_graph[16] = {
0x5A, 0xA5, // Frame header
0x0D, // Data length (13 bytes)
0x82, // Write instruction
0x11, 0x10, // VP address (0x1110)
0x5A, 0xA5, // Start curve buffer writing operation
0x01, 0x00, // Number of curve data blocks (1 block)
0x00, 0x02, // Channel 0, 2 data words
highByte(fixed_temp), lowByte(fixed_temp), // Fixed temperature value (high and low bytes)
0x00, 0x00 // Placeholder for second data point (optional)
};

// Print the command to Serial Monitor for debugging
Serial.println("Sending Fixed Command to DWIN Display:");
for (int i = 0; i < 16; i++) {
Serial.print("0x");
if (curve_graph[i] < 0x10) Serial.print("0"); // Add leading zero for single-digit hex values
Serial.print(curve_graph[i], HEX);
Serial.print(" ");
}
Serial.println();

// Send the command to the DWIN display
Serial1.write(curve_graph, 16);

// Wait for a response from the DWIN display
delay(100); // Adjust delay based on response time
if (Serial1.available()) {
Serial.println("Response from DWIN Display:");
while (Serial1.available()) {
char response = Serial1.read();
Serial.print("0x");
if (response < 0x10) Serial.print("0"); // Add leading zero for single-digit hex values
Serial.print(response, HEX);
Serial.print(" ");
}
Serial.println();
} else {
Serial.println("No response from DWIN Display.");
}

// Print fixed temperature to Serial Monitor for debugging
Serial.print("Fixed Temperature: ");
Serial.print(fixed_temp);
Serial.println(" °C");

// Delay for stability
delay(500); // Send data every 500ms
}

void setup() {
// Initialize Serial Monitor for debugging
Serial.begin(9600);

// Initialize Serial1 for communication with DWIN display
Serial1.begin(115200);

// Wait for DWIN display to initialize
delay(500);

Serial.println("Initialization complete. Sending fixed temperature data...");
}

void loop() {
// Send fixed temperature data to the DWIN display
sendFixedTemperatureToGraph();
}when i used this code display show vp 1100 for numeric temp. show and working but vp9900 graph not work , serial monitor show
Sending to VP 9900: 35
Sending to VP 1100: 35
Temp: 35