Beispiel unter Atlas Scientific
https://www.atlas-scientific.com/_files/code/pi_sample_code.pdf
To enable the serial port for your own use you need to disable login on the port.
There are two files that need to be edited. The first and main one is /etc/inittab
..
T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
#!/usr/bin/python
import serial
print "Welcome to the Atlas Scientific Raspberry Pi example."
usbport = '/dev/ttyAMA0'
ser = serial.Serial(usbport, 38400)
# turn on the LEDs
ser.write("L1\r")
..
Stackoverflow
Über Phyton
http://stackoverflow.com/questions/21866762/sending-serial-communication-from-raspberry-pi
so ähnlich unter phyton…scheint aber noch fehlerhaft zu sein
import serial
ser = serial.Serial('COM8', 115200)
ser.write(b'\x4c\x20\x46')