Reading USBRecv Problem
|
10-12-2023, 08:53 PM
(This post was last modified: 10-12-2023 09:04 PM by toml_12953.)
Post: #1
|
|||
|
|||
Reading USBRecv Problem
I'm trying to read the data from a USB keyboard continuously.
Using the program below, I get USBKBD Error: Bad argument type The same USB commands work on the Home screen just fine. All I want to do is stay in the loop until a key is pressed on the keyboard then print the HID data. What am I doing wrong? Code: EXPORT USBKBD() Tom L Cui bono? |
|||
10-12-2023, 09:25 PM
Post: #2
|
|||
|
|||
RE: Reading USBRecv Problem
USBRecv() returns an (empty) list.
Don't stick that in 'A' ie A:={1,2,3} won't work well.. |
|||
10-12-2023, 09:52 PM
(This post was last modified: 10-12-2023 10:20 PM by toml_12953.)
Post: #3
|
|||
|
|||
RE: Reading USBRecv Problem
(10-12-2023 09:25 PM)gehakte_bits Wrote: USBRecv() returns an (empty) list. I got the following working. Now all I need to do is make a lookup table to print the character typed rather than the HID list. This code will work no matter what keyboard you use. My first draft would only work with one brand/model. Code: EXPORT USBKBD() Tom L Cui bono? |
|||
10-13-2023, 12:01 PM
(This post was last modified: 10-13-2023 01:55 PM by toml_12953.)
Post: #4
|
|||
|
|||
RE: Reading USBRecv Problem
OK, here's the latest version. It correctly handles A-Z and a-z but no special characters and no Caps Lock.
Code: EXPORT USBKBD() Tom L Cui bono? |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)