I'm having a similar issue with a Teensy 4.0 ( Serial/Keyboard/Mouse/Joystick) plugged into a RPI 4 (5.15.32-V7l+ ) running Arduino 1.8.19 ( but works nicely in Windows 10)
It hangs even with a simple code like:
i
Code:
nt ct=0;
void setup() {
pinMode(2, INPUT_PULLUP);
pinMode(3, INPUT_PULLUP);
Serial.begin(115200);
while(!Serial && millis()<4000);
}
void loop() {
if (Serial) Serial.print(".");
ct++;
if (ct>20*5) {
ct=0;
if (Serial) Serial.println();
}
Joystick.button(2, digitalRead(2));
Joystick.button(3, digitalRead(3));
// a brief delay, so this runs 20 times per second
delay(50);
}
evtest shows the devices but reports are not received by RPI ( (or sent by Teensy?) after a few minutes ( but the dots keep printing at the Serial monitor)
pi@raspberrypi:~ $ evtest
No device specified, trying to scan all of /dev/input/event*
Not running as root, no devices may be available.
Available devices:
/dev/input/event0: Dell Dell USB Keyboard
/dev/input/event1: ILITEK ILITEK-TP
/dev/input/event2: ILITEK ILITEK-TP Mouse
/dev/input/event3: Teensyduino Serial/Keyboard/Mouse/Joystick
/dev/input/event4: BT5.0 Mouse
/dev/input/event5: BT5.0 Mouse Consumer Control
/dev/input/event6: Teensyduino Serial/Keyboard/Mouse/Joystick Mouse
/dev/input/event7: vc4
/dev/input/event8: vc4
/dev/input/event9: Teensyduino Serial/Keyboard/Mouse/Joystick
/dev/input/event10: Teensyduino Serial/Keyboard/Mouse/Joystick
Select the device event number [0-10]: 9
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x16c0 product 0x487 version 0x111
Input device name: "Teensyduino Serial/Keyboard/Mouse/Joystick"
Supported events:
Event type 0 (EV_SYN)
Event type 1 (EV_KEY)
Event code 288 (BTN_TRIGGER)
Event code 289 (BTN_THUMB)
Event code 290 (BTN_THUMB2)
Event code 291 (BTN_TOP)
Event code 292 (BTN_TOP2)
Event code 293 (BTN_PINKIE)
Event code 294 (BTN_BASE)
Event code 295 (BTN_BASE2)
Event code 296 (BTN_BASE3)
Event code 297 (BTN_BASE4)
Event code 298 (BTN_BASE5)
Event code 299 (BTN_BASE6)
Event code 300 (?)
\ Event code 301 (?)
Event code 302 (?)
Event code 303 (BTN_DEAD)
Event code 704 (BTN_TRIGGER_HAPPY1)
Event code 705 (BTN_TRIGGER_HAPPY2)
Event code 706 (BTN_TRIGGER_HAPPY3)
Event code 707 (BTN_TRIGGER_HAPPY4)
Event code 708 (BTN_TRIGGER_HAPPY5)
Event code 709 (BTN_TRIGGER_HAPPY6)
Event code 710 (BTN_TRIGGER_HAPPY7)
Event code 711 (BTN_TRIGGER_HAPPY8)
Event code 712 (BTN_TRIGGER_HAPPY9)
Event code 713 (BTN_TRIGGER_HAPPY10)
Event code 714 (BTN_TRIGGER_HAPPY11)
Event code 715 (BTN_TRIGGER_HAPPY12)
Event code 716 (BTN_TRIGGER_HAPPY13)
Event code 717 (BTN_TRIGGER_HAPPY14)
Event code 718 (BTN_TRIGGER_HAPPY15)
Event code 719 (BTN_TRIGGER_HAPPY16)
Event type 3 (EV_ABS)
Event code 0 (ABS_X)
Value 0
Min 0
Max 1023
Fuzz 3
Flat 63
Event code 1 (ABS_Y)
Value 0
Min 0
Max 1023
Fuzz 3
Flat 63
Event code 2 (ABS_Z)
Value 0
Min 0
Max 1023
Fuzz 3
Flat 63
Event code 5 (ABS_RZ)
Value 0
Min 0
Max 1023
Fuzz 3
Flat 63
Resolution 186
Event code 6 (ABS_THROTTLE)
Value 0
Min 0
Max 1023
Fuzz 3
Flat 63
Event code 16 (ABS_HAT0X)
Value 0
Min -1
Max 1
Event code 17 (ABS_HAT0Y)
Value -1
Min -1
Max 1
Event type 4 (EV_MSC)
Event code 4 (MSC_SCAN)
Properties:
Testing ... (interrupt to exit)
Event: time 1656511254.547015, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90002
Event: time 1656511254.547015, type 1 (EV_KEY), code 289 (BTN_THUMB), value 0
Event: time 1656511254.547015, -------------- SYN_REPORT ------------
Event: time 1656511254.697102, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90002
Event: time 1656511254.697102, type 1 (EV_KEY), code 289 (BTN_THUMB), value 1
Event: time 1656511254.697102, -------------- SYN_REPORT ------------
Event: time 1656511257.998463, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90003
Event: time 1656511257.998463, type 1 (EV_KEY), code 290 (BTN_THUMB2), value 0
Event: time 1656511257.998463, -------------- SYN_REPORT ------------
Event: time 1656511258.048642, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90003
Event: time 1656511258.048642, type 1 (EV_KEY), code 290 (BTN_THUMB2), value 1
Event: time 1656511258.048642, -------------- SYN_REPORT -----------