My boss and I were talking about Raspberry Pi (he is buying one) and LEGO Mindstorms this week. We were both wondering if there was an easy way to connect the Mindstorms peripherals to the Pi. A quick Google search tells me that the LEGO motors are 9 volt, so no. But I did find a blog post that got me going using the RCX brick and programming it from the Pi.
https://minordiscoveries.wordpress.com/2014/01/20/using-nqc-on-a-raspberry-pi-to-program-a-lego-mindstorms-rcx-brick
I got pretty far, but it didn’t respond to the raw command. I did skip loading the firmware on my RCX 2.0 because I’m paranoid it might be an irreversible step. But that is probably why it didn’t work, so I’m going to do some more research