Duet Wifi Gui for Raspberry Pi

  • Hi,
    I'm trying to develop a basic gui for duet via python (over usb).
    Here is my sample codes.
    0_1534145066940_Loop3D_2.txt Python File (change .txt to .py)
    0_1534145129998_Loop3D.txt Glade File (change .txt to .glade)

    read_duet thread reads data from duet once every 100 milliseconds and updates labels. But I have a problem. If a command (like home all) comes during this reading operation, I can't read data from duet until operation end.


    (when a command come)

    Do you have a suggestion for this problem ?

    Thanks & Regards

  • administrators

    The problem with USB is that it's strictly serial because the Duet provides only one endpoint. I am a little surprised that homing is a problem, but heating will certainly be a problem. Use HTTP instead of USB to avoid this issue.

  • Sorry I'm not well-informed about http.

    Do I need a network for http communication ? I wanna set up network-free system like PanelDue. Should I use UART ?

    Could you give more detailed information ?

  • administrators

    UART has the same problem, a single channel. Yes you need a network to use HTTP. I guess you could use both UART and USB, one to send commands and another to get status information.

  • I tried UART communication but I failed.


    RPi ------> Duet

    Rx to Tx
    Tx to Rx
    GND to GND


    import serial
    ser = serial.Serial(port = '/dev/ttyS0',bytesize=8, baudrate = 57600,stopbits = 1,parity = 'N')
    ser.write("M408 S0\n")

    But I couldn't get response from duet.

  • administrators

    By default the Duet only accepts commands from the PanelDue port if they contain line numbers and checksums. You can use the M575 command to change this.

  • Many Thanks for your helps.

    "M575 P1 B57600 S0" command solved my problem.

    Thanks & Regards

Log in to reply