So i used UART on the raspi to communicate with another device via two little python programms.
send.py:
import serial