I put in fresh batteries, turn on the keyboard switch, and plug the USB adapter + wireless dongle set directly into a USB C port on my computer. I check using notepad that both the keyboard and the mouse (touchpad) work perfectly. When connecting it for the first time to the ESP32, we are going to go a little blind and it is essential to be sure that it works.
I solder the IN-OUT and USB-OTG pads indicated by Cicciocb in the new help 1.51.8 on my ESP32-S3.
I connect the ESP32 to a USB port on my computer and on the [Local Link Removed for Guests] page I update to the new version without any problem. Since I have only checked the box corresponding to firmware, it respects the previous configuration and the programs it contained. A round of applause for Francesco.
I assemble the entire system VGA monitor + ESP32-S3 VGA board + USB adapter + wireless keyboard receiver + keyboard with touchpad and turn on the assembly.
I load the little Cicciocb demo program at [Local Link Removed for Guests] and.... Disappointment. I don't get anything.
I comment on the line vga.pinout 4,5,6, 7,15,16, 17, 18, 8.3 which I remember was not necessary for my system and the screen begins to appear, but the execution is interrupted due to lack of fonts files , image, etc. I decide that to start on USB it is too complicated a program and I simplify:
Code: [Local Link Removed for Guests]
usb.setup 640, 480
onMouseMove mouse_Move
onMouseClick mouse_Click
onKeyboard keyboard_Press
wlog "Esperando..."
wait
mouse_Move:
wlog "mouse move", mouseX, mouseY, mouseZ
return
mouse_Click:
wlog "mouse click", mouseX, mouseY, mouseZ
return
keyboard_Press:
wlog "keyboard", kbdcode
return
I grow up and write a more complicated program:
Code: [Local Link Removed for Guests]
txt$ = "Those are my principles, and if you don't like them... Well, I have others."
usb.setup 640, 480
onKeyboard kbd
vga.delete
vga.init 2
vgaGui.init 2, black
tft.loadfont "/fonts/FreeMono9pt7b.bin", 10
'vgaGui.textline(x,y width,height,"text",font,color_text,color_back,color_frame,alignment,margin)
vgaGui.textLine(0, 0, 640, 30, "WordStar Professional Release 4", 10, black, darkgrey, blue, 4)
'vgaGui.textArea(x,y,width,height,"text",font,alignment,color_text,color_back,color_frame,margin)
txt = vgagui.textArea(0, 32, 640, 400, txt$, 0, 0, cyan, black, red, 12)
vgagui.refresh
vga.show
wait
' -------------
kbd:
vgagui.gettext txt, txt$
select case kbdcode
case 8
if (len(txt$) > 0) then txt$ = left$(txt$, len(txt$) - 1)
case 13
txt$ = txt$ + chr$(10)
case else
if (len(txt$) < 1000) then txt$ = txt$ + chr$(kbdcode)
end select
vgagui.setText txt, txt$
vgagui.refresh
vga.show
return
And the magic continues. The sensation of seeing the characters that I press appear on the VGA screen is curious. Something so everyday, but this time through an ESP32 and Annex.
https://youtu.be/2MhzPMZ2M64
Note: I can't get the [Enter] key to jump to the next line of the textArea, but everything will work. However, if Francesco gave me a clue...