with some help I could run a process in python, Now I wan't to share a value betwenn the two tasks. I can set the value inside the init, but I can't change it inside the run method.
And by the way: how to kill the process when the main process stops?
from multiprocessing import Process, Value
import serial
import time
class P(Process):
    def __init__(self, num):
        num.value = 15
        super(P, self).__init__()
    def run(self):
        while True:
            num.value = num.value + 1
            print("run simple process")
            time.sleep(0.5)
def main():
    while True:
        print("run main")
        print (num.value)
        time.sleep(2.5)
if __name__ == "__main__":
    num = Value('d', 0.0)
    p = P(num)
    p.start()
    #p.join()
    main()