ESP32 S3 VGA can't display more than 5 character on the same time

AndrewLevel100
Posts: 1
Joined: Sun Nov 17, 2024 6:21 pm

ESP32 S3 VGA can't display more than 5 character on the same time

Postby AndrewLevel100 » Sun Nov 17, 2024 6:45 pm

  1. #include "ESP32S3VGA.h"
  2. #include <GfxWrapper.h>
  3. #include <Fonts/Picopixel.h>
  4. #include "EspUsbHost.h"
  5.  
  6. //                   r,r,r,r,r,  g,g, g, g, g, g,   b, b, b, b, b,   h,v
  7. const PinConfig pins(-1,-1,-1,-1,1,  -1,-1,-1,-1,-1,2,  -1,-1,-1,-1,42,  41,40);
  8.  
  9. //VGA Device
  10. VGA vga;
  11. Mode mode = Mode::MODE_320x240x60;
  12. GfxWrapper<VGA> gfx(vga, mode.hRes, mode.vRes);
  13.  
  14. class MyEspUsbHost : public EspUsbHost {
  15.   void onKeyboardKey(uint8_t ascii, uint8_t keycode, uint8_t modifier) {
  16.     if (' ' <= ascii && ascii <= '~') {
  17.       gfx.print((char)ascii);
  18.     } else if (ascii == '\r') {
  19.       gfx.println();
  20.     }
  21.   };
  22. };
  23.  
  24. MyEspUsbHost usbHost;
  25.  
  26. //initial setup
  27. void setup()
  28. {
  29.   Serial.begin(115200);
  30.     vga.bufferCount = 2;
  31.     if(!vga.init(pins, mode, 16)) while(1) delay(1);
  32.   usbHost.begin();
  33.   usbHost.setHIDLocal(HID_LOCAL_Japan_Katakana);
  34.     vga.start();
  35.     gfx.setCursor(0, 10);
  36.   vga.clear(vga.rgb(0, 0, 0));
  37.     gfx.setFont(&Picopixel);
  38. }
  39.  
  40. //the loop is done every frame
  41. void loop()
  42. {
  43.   usbHost.task();
  44.     vga.show();
  45. }
Greetings,

I'm trying to display characters to a screen with a keyboard using "ESP32S3VGA" and "EspUsbHost",
but when I write more than 5/6 characters the screen just loses signal and it just says "no signal", like it doesn't even send a signal after this character limit,
The VGA RGB are connected to GPIO 1, 2 and 42, The Hsync is 41 and the Vsync is 40.
The Keyboard is connected to the pins 20 and 19 (The USB+ and USB- of the board).
I'm using an ESP32 S3 WROOM 1 with OPI PSRAM.


Could someone figure this out?

Thanks.

Who is online

Users browsing this forum: YaCy [Bot] and 118 guests