Developer knowledge network · moderated exchange

UnreliableCode コミュニティ

開発者リサーチ、リバース エンジニアリング、コーディング コミュニティ

Guide

Hardware USB mouse delta packet emulation with Raspberry Pi Pico

colorbot_crafter
Hardware Modder
MEMBER
担当者: 126
参加日: Mar 2021
投稿: 14
ありがとう: 78
1 か月前 · Jun 29, 2026 8:39 PM
#1

Why Raspberry Pi Pico (RP2040) is replacing Arduino Leonardo for hardware mouse control:

  1. Dual Cortex-M0+ cores running at 133MHz (5x faster than 16MHz ATmega32U4).
  2. Hardware USB Controller supports custom TinyUSB HID descriptors.
  3. UART / Serial baud rate supports up to 921,600 baud, reducing serial packet latency from 4ms down to 0.1ms.

Code snippet in C with TinyUSB:

C
#include "tusb.h"
void send_mouse_delta(int8_t dx, int8_t dy, uint8_t buttons) {
    if (tud_hid_ready()) {
        tud_hid_mouse_report(0, buttons, dx, dy, 0, 0);
    }
}
dma_ghost
DMA Guru
MEMBER
担当者: 115
参加日: Jan 2020
投稿: 12
ありがとう: 83
1 か月前 · Jun 30, 2026 12:52 AM
#2

RP2040 is awesome. You can also spoof the USB string descriptors (Manufacturer, Product, Serial) in flash memory.

val_driver_guy
Driver Dev
MEMBER
担当者: 42
参加日: May 2019
投稿: 24
ありがとう: 37
1 か月前 · Jun 30, 2026 11:03 AM
#3

0.1ms transfer latency is huge. Completely eliminates input delay on fast flicks.