As you can see, the mouse and the keyboards work well[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Fri Dec 29, 2023 1:12 pm Guuuuaaaauuuuu!!!!
IMG_20231229_140925.jpg

As you can see, the mouse and the keyboards work well[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Fri Dec 29, 2023 1:12 pm Guuuuaaaauuuuu!!!!
IMG_20231229_140925.jpg
Sure, as you can see in the demo code provided in the help , the USB can be used independently from the VGA[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Fri Dec 29, 2023 1:41 pm I hope the USB will work on these purple n16r8 UNO clones, cos I can't find any solder bridge options.
But I don't even have a vga interface done for it yet.
Oh dammit Fernando, you're supposed to be creating pcb's, not rushing me into changing the order of my todo list priorities.
Thanks for the feedback, BTW.
Can't wait to create VGA menu's and options selection and multiple pages, USB is gonna be a game changer.
Francesco, have you used the USB input for anything other than a VGA display... like as an alternative to physical or web button selection ?
Code: [Local Link Removed for Guests]
usb.setup 640, 480
onMouseMove Mouse_Move
onMouseClick Mouse_Click
onKeyboard Keyboard_Press
onGamePad Gamepad_Change
wlog "waiting..."
wait
Mouse_Move:
print "mouse move", mouseX, mouseY, mouseZ
wlog "mouse move", mouseX, mouseY, mouseZ
pause 1000
return
Mouse_Click:
print "mouse click", mouseX, mouseY, mouseZ
wlog "mouse click", mouseX, mouseY, mouseZ
return
Keyboard_Press:
print "keyboard", kbdcode
wlog "keyboard", kbdcode
return
Gamepad_Change:
print "Gamepad", gamepadcodes(1), gamepadcodes(2), gamepadcodes(3), gamepadcodes(4), gamepadcodes(5), gamepadcodes(6)
wlog "Gamepad", gamepadcodes(1), gamepadcodes(2), gamepadcodes(3), gamepadcodes(4), gamepadcodes(5), gamepadcodes(6)
return
Code: [Local Link Removed for Guests]
'Simple web page for testing USB output, also defaults to wlog for easy confirmation of wifi pairing.
dbug=1 '1=send usb output to wlog, 0=turn off wlog (can also be controlled by webpage checkbox.
xres=640: yres=480
usb.setup xres, yres 'also sets the webpage meter maximums
kbdcode=0
gosub web
onhtmlreload web
onMouseMove Mouse_Move
onMouseClick Mouse_Click
onKeyboard Keyboard_Press
onGamePad Gamepad_Change
wlog "waiting..."
wait
web:
cls
autorefresh 250
a$=""
a$=a$ + |<br><div style='display: table; margin-right:auto;margin-left:auto;text-align:center;font-size: 80%;'>|
a$=a$ + |Mouse X | + textbox$(mousex,"mousewin")
a$=a$ + |<br><br>|
a$=a$ + meter$(mousex,0,xres,"mousemwin")
a$=a$ + |<br><br>|
a$=a$ + |Mouse Y | + textbox$(mousey,"mousewin")
a$=a$ + |<br><br>|
a$=a$ + meter$(mousey,0,yres,"mousemwin")
a$=a$ + |<br><br><br>|
a$=a$ + |Mouse Z | + textbox$(mousez,"mousewin")
a$=a$ + |<br><br><br>|
a$=a$ + cssid$("mousewin", "width:40; height:24; text-align:center; background:GhostWhite;color:darkblue;")
a$=a$ + cssid$("mousemwin", "width:400; height:24; text-align:center; background:GhostWhite;color:darkblue;")
a$=a$ + |Keyboard | + textbox$(kbdcode,"kbwin")
a$=a$ + cssid$("kbwin", "width:40; height:24; text-align:center; background:GhostWhite;color:darkred;")
a$=a$ + |<br><br><br>|
a$=a$ + |wlog (Dbug) | + checkbox$(dbug)
a$=a$ + |<br><br>|
html a$: a$=""
return
Mouse_Move:
print "mouse move", mouseX, mouseY, mouseZ
if dbug then
wlog "mouse move", mouseX, mouseY, mouseZ
pause 1000
endif
return
Mouse_Click:
print "mouse click", mouseX, mouseY, mouseZ
if dbug then wlog "mouse click", mouseX, mouseY, mouseZ
return
Keyboard_Press:
print "keyboard", kbdcode
if dbug then wlog "keyboard", kbdcode
return
Gamepad_Change:
print "Gamepad", gamepadcodes(1), gamepadcodes(2), gamepadcodes(3), gamepadcodes(4), gamepadcodes(5), gamepadcodes(6)
if dbug then wlog "Gamepad", gamepadcodes(1), gamepadcodes(2), gamepadcodes(3), gamepadcodes(4), gamepadcodes(5), gamepadcodes(6)
return