This is basically an open source version of that, which uses Bluetooth rather than USB
But the linked post describes a Raspberry Pi + Capture Card + OpenCV solution that is scanning the screen to detect when Shiny Pokemon are found, which is much more involved.
The $30 'Switch Up' device I linked to seems to operate only on emulating button inputs. Like, you can record and playback a macro.