Simple sketch for the PMW3901 breakout board running on a Dragonfly STM32L476 development board, although any Arduino MCU with SPI can be used. Make sure to add Bitcraze's PMW3901 library to your Arduino IDE.
Board available at Tindie.