-
I cant get the display scale or size to change when using an ESP32 with my Android phone |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
What is the suspected function/command which does not work for ESP32? |
Beta Was this translation helpful? Give feedback.
-
The following test sketch runs on the UNO and the ESP32.
They both start at a screen resolution of 51.6% 696x1080 but the UNO will change to full screen 100% 2094x1080 and the ESP32 stays at 51%
<>
#include <Arduino.h>
#define DO_NOT_NEED_BASIC_TOUCH_EVENTS // Disables basic touch events like down, move and up. Saves 620 bytes program memory and 36 bytes RAM
#include "BlueDisplay.hpp"
void initDisplay(void);
void drawGui(void);
int sCurrentDisplayWidth;
int sCurrentDisplayHeight;
#define RED ((color16_t)0xF800)
void setup() {
#if defined(ESP32)
Serial.begin(115200);
Serial.println("START " __FILE__ " from " __DATE__ "\r\nUsing library version " VERSION_BLUE_DISPLAY);
initSerial("ESP-BD_Example");
Serial.println("Start ESP32 BT-client with name \"ESP-BD_Example\"");
#else
initSerial();
#endif
BlueDisplay1.initCommunication(&initDisplay, &drawGui);
#if defined(USE_SERIAL1) // defined in BlueSerial.h
#if defined(__AVR_ATmega32U4__) || defined(SERIAL_PORT_USBVIRTUAL) || defined(SERIAL_USB) /*stm32duino*/|| defined(USBCON) /*STM32_stm32*/|| defined(SERIALUSB_PID) || defined(ARDUINO_attiny3217)
delay(4000); // To be able to connect Serial monitor after reset or power up and before first print out. Do not wait for an attached Serial Monitor!
#endif
#endif
}
void loop() {
BlueDisplay1.clearDisplay(COLOR16_RED);
BlueDisplay1.drawText(24, 90, "TOP LEFT = 24,24", 88, COLOR16_BLACK, COLOR16_NO_BACKGROUND);
delay(1500);
BlueDisplay1.clearDisplay(COLOR16_BLUE);
delay(1500);
BlueDisplay1.fillRect(0, 0, 1047, 540 , COLOR16_RED );
BlueDisplay1.drawRect(1000, 600, 2000, 1000, COLOR16_WHITE, 13);
BlueDisplay1.drawCircle(1047, 540, 100, COLOR16_BLACK, 40);
BlueDisplay1.drawLineWithThickness(1047, 540, 1347, 240, 40, COLOR16_BLACK);
delay(1500);
}
void initDisplay(void) {
sCurrentDisplayWidth = BlueDisplay1.getMaxDisplayWidth();
sCurrentDisplayHeight = BlueDisplay1.getMaxDisplayHeight();
BlueDisplay1.setFlagsAndSize(BD_FLAG_FIRST_RESET_ALL | BD_FLAG_USE_MAX_SIZE | BD_FLAG_TOUCH_BASIC_DISABLE, sCurrentDisplayWidth, sCurrentDisplayHeight);
}
void drawGui(void) {
BlueDisplay1.clearDisplay(COLOR16_RED);
}
<>
From: Armin ***@***.***>
Sent: 01 January 2023 18:14
To: ArminJo/Arduino-BlueDisplay ***@***.***>
Cc: B1Gt0ne ***@***.***>; Author ***@***.***>
Subject: Re: [ArminJo/Arduino-BlueDisplay] ESP32 DISPLAY (Discussion #13)
What is the suspected commad which does not work for ESP32?
—
Reply to this email directly, view it on GitHub <#13 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AIDV444HCUQGFTSJZSZDGVDWQHCO3ANCNFSM6AAAAAATJTTNDY> .
You are receiving this because you authored the thread. <https://github.com/notifications/beacon/AIDV4466IXL5J6REBCI2YILWQHCO3A5CNFSM6AAAAAATJTTND2WGG33NNVSW45C7OR4XAZNRIRUXGY3VONZWS33OINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQAIWW5A.gif> Message ID: ***@***.*** ***@***.***> >
|
Beta Was this translation helpful? Give feedback.
-
Thanks, |
Beta Was this translation helpful? Give feedback.
Thanks,
could you please delete the original mail content, the empty lines and mark code as code section -> see
<>
menue point above.