The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
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()
BEGIN
LOCAL A:={0,0,0,0,0,0,0,0};

USBOpen(1084,8467);

WHILE A=={0,0,0,0,0,0,0,0} DO
  A:=USBRecv;
END;

PRINT(A);
END

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Reading USBRecv Problem - toml_12953 - 10-12-2023 08:53 PM
RE: Reading USBRecv Problem - gehakte_bits - 10-12-2023, 09:25 PM
RE: Reading USBRecv Problem - toml_12953 - 10-12-2023, 09:52 PM
RE: Reading USBRecv Problem - toml_12953 - 10-13-2023, 12:01 PM



User(s) browsing this thread: 1 Guest(s)