PMW3610 Optical Mouse Sensor
PMW3610 is a low‑power optical mouse sensor.
- Currently, only implemented for nRF52 and RP2040 with a single-wire (SDIO) half-duplex SPI.
- Set
motionpin for better power efficiency. If omitted, the sensor is polled. - By default, report rate is limited to 125 Hz to prevent flooding the event channel, which causes latency issues especially over BLE.
toml configuration
spi.mosi and spi.miso must be the same pin, or one of them empty.
Split
To add the sensor to the central or peripheral use
PointingEvent carries a device_id so that each PointingProcessor can be paired
with a specific sensor. If you have sensors on both halves of a split keyboard,
assign distinct ids to avoid the central treating them as the same device:
The peripheral forwards events to the central with the device_id preserved.
The generated PointingProcessorConfig on the central will automatically use the
matching device_id for each sensor.
Adding device_id to PointingEvent changes the serialized binary format used by the
split protocol. Both halves of a split keyboard must be flashed with the same
firmware version at the same time.
Rust configuration
Define a PointingDevice and add it to run_all! macro.
For a split keyboard this must be added to the file (central.rs or peripheral.rs) corresponding to the side the sensor is connected to.
And define a PointingProcessor and add it to run_all! macro to process the events.
This should be added to the central.rs-File even if the sensor is on split peripheral.
Pointing Modes
The PointingProcessor has four modes (Cursor, Scroll, Sniper, Caret) with per‑layer configuration. See the PointingProcessor page for all options.