Lopy to Raspberry pie 3 via serial



  • Hello! Can anyone help me please? I want to send data from lopy to raspberry pie 3...I follow the instructions from other topics but I can t figure it out! Thank you!

    lopy code:

    import machine, time, pycom
    pycom.heartbeat(False)
    pycom.rgbled(0x000000)
    #uart1 = UART(1, 115200, pins=("P3", "P4"))
    uart1 = UART(1, 115300, bits=8, parity=None, stop=1)
    uart1.init(baudrate=115200, bits=8, parity=None, stop=1)

    while True:
    uart1.write(b'send')
    time.sleep(1)

    raspberry code:

    import serial
    with serial.Serial('/dev/ttyS0', 115200, timeout=10) as ser:
    print(ser.read(4))

    feaebc35-34c1-438f-b95c-c0583b62a50c-image.png

    d6e0af0a-de96-48c0-bcd0-1002f280dae3-image.png


Log in to reply
 

Pycom on Twitter