Hi,
here you have video example what can be achieved using Arduino Uno(Bascom programmed, but can be with fpc too), RPi(Lazarus programmed) using protocoll i2c(twi). Along with Lazarus I used excellent wiringPi library.
https://www.youtube.com/watch?v=QCoWm27_rpkI wish you good luck in the implementation!
Regards,
Martin