Skip to content

How to Get a Variable 'vp' After a User Clicks on the Screen? #2

@caosdp-rs

Description

@caosdp-rs

I have the following situation:

Captura de tela 2024-12-31 160421

How can an Arduino detect this event?

Sample code

#include <Arduino.h>
#include <Dwin2.h>
// Rx Tx ESP gpio connected to DWin Display
#define RX_PIN 16
#define TX_PIN 17
// Class of controlling UI elements of the display
DWIN2 dwc;
// Callback function to receive a response from the display
void dwinEchoCallback(DWIN2 &d);
const int d = 1000;
void setup() {
    Serial.begin(115200);
    while (Serial.available()) {}
    dwc.begin();
    // Set callback for answer
    dwc.setUartCbHandler(dwinEchoCallback);
    // Show commands and answers
    dwc.setEcho(false);
}

void loop() {
    delay(100);
}

void dwinEchoCallback(DWIN2 &d)
{
    Serial.print("Echo ");
    Serial.println(d.getDwinEcho());
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions