Use python and it's native GPIO support :)
But thank you for the link... So Arduino programs can be ported to RPi.
You can usually use programms in the background to control switches even with ES running - because these programs are not "active" like in windows. They just wait for a trigger to act (=set interrupt)