Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Connect raspberry pi to control movement

    Scheduled Pinned Locked Moved
    Duet Hardware and wiring
    5
    8
    468
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Eddasundefined
      Eddas
      last edited by

      I have a duet2 wifi and would like to connect a raspberry pi in order to control the stepper motors.

      I don't understand how I can connect them, and which tools I can use to send commands

      1 Reply Last reply Reply Quote 0
      • Danalundefined
        Danal
        last edited by

        Any external computer, including a Pi, can connect to the Duet 2 running RepRap V2 firmware via:

        1. Telnet.

        Enable this in your config.g. Connect to it, and everything you send will be interpreted as a G-code command.

        1. HTTP Web interface.

        Protocol is here: https://github.com/chrishamm/DuetWebControl/tree/legacy
        See RR_gcode to send g code commands.

        1. The port that is used by the PanelDue (i.e. hardwire)

        This is 3V serial TTL. If you don't know what that means, ask more questions here.

        And, last, if you move to a Duet3 running RepRap V3 firmware, item (2) above changes to "websockets" instead of HTTP.

        Delta / Kossel printer fanatic

        1 Reply Last reply Reply Quote 0
        • A Former User?
          A Former User
          last edited by

          Could also straight up connect via usb and send g-code to the serial port the duet provides

          Danalundefined Eddasundefined shenouda13undefined 3 Replies Last reply Reply Quote 1
          • Danalundefined
            Danal @A Former User
            last edited by

            @bearer said in Connect raspberry pi to control movement:

            Could also straight up connect via usb and send g-code to the serial port the duet provides

            Oh, yeah, duh. There is the EASY way...

            Delta / Kossel printer fanatic

            1 Reply Last reply Reply Quote 0
            • Eddasundefined
              Eddas @A Former User
              last edited by

              This post is deleted!
              A Former User? 1 Reply Last reply Reply Quote 0
              • A Former User?
                A Former User @Eddas
                last edited by

                @Eddas said in Connect raspberry pi to control movement:

                @bearer
                Tried writing using pyusb but get access denied. Know any other methods for writing through usb?

                sounds like permissions issues, add yourself to the dialout group or look into udev rules

                1 Reply Last reply Reply Quote 0
                • shenouda13undefined
                  shenouda13 @A Former User
                  last edited by

                  I have connected a duet3D Mini 5+ to a raspberry pi 4 with a usb cable. I am trying to send gcode commands to the duet through the serial package in python. I have a stepper motor connected to the duet. So i am trying to send a command to rotate it. when i run the python script it just stops at line (ser.write) and it doesn't execute the subsequent lines.

                  here is the code:

                  import serial
                  ser = serial.Serial("/dev/ttyACM0", 115200)
                  time.sleep(2)
                  print('read')
                  ser.write(b"G1 Y10 F5000\n")
                  print('write')
                  time.sleep(1)
                  ser.close()

                  if I connect the duet to the laptop and execute the gcode line in the YAT terminal it works fine.

                  Am I missing something?

                  jay_s_ukundefined 1 Reply Last reply Reply Quote 0
                  • jay_s_ukundefined
                    jay_s_uk @shenouda13
                    last edited by

                    @marco13 please stick to the thread you've already created and not spam this one

                    Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

                    1 Reply Last reply Reply Quote 1
                    • First post
                      Last post
                    Unless otherwise noted, all forum content is licensed under CC-BY-SA