Is it difficult to set up, since I have not done it in a while, I am not sure. Back some time ago there was a thread in the Linux forum, for doing just that. The instructions were very straight forward and I do not remember having a problem. I am not sure if anybody is supporting that any longer.
Do I have FB code for accessing the IO pins, not sure, it has been a long time since I was experimenting with that. Using Python was very straight forward, and there is a lot of example code on the Internet, for doing just that.
I am not absolutely positive, but I will probably not be posting any code any longer, I am tired of being harassed. I will make some effort to answer questions and maybe present some very very short snippets. I have also put FB on hold, I am now using Python as my favorite prototyping tool. I found that there is a whole lot of examples and reasonable explanations on the Internet concerning Python.
Concerning the Raspberry Pi, my setup is Raspberry Pi Desktop PC software, you can load that on an x86 machine and it does have some programs for hooking up to a Raspberry Pi Zero, where it allows you to access the IO pins. In essence you can have access to some IO pins from your desktop PC. No I have not tried that yet, I am involved in another project at the moment. For the curious, it is using Python SQLite to work a database. Hope all this helps.