How can I connect a flat flex cable to pins of Arduino/RPi?
You could get one of these (picture) and solder a few cable to the pin holes which then connects to the Arduino/Raspberry Pi

Picture:
https://www.amazon.com/Flexible-Adapter-Raspberry-Sealink-Equipment/dp/B0819V6G9M
6 pins (0.5mm 1mm pitch):
https://www.amazon.com/uxcell-Converter-Couple-Extend-Adapter/dp/B07RWRK4WX/ref=sr_1_4?dchild=1&amp;keywords=fpc+ffc+5+pin&amp;qid=1600629771&amp;sr=8-4