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

    How can I set up a communication between a Duet3 and an ESP32 ?

    Scheduled Pinned Locked Moved
    General Discussion
    spi comm communication sensor
    4
    5
    314
    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.
    • e4dundefined
      e4d
      last edited by

      Hello,

      I want to add quite a few sensors on my machine that are not natively supported by RRF3. I already added one using an ESP32 that I programmed and "communicate" with my Duet using 2 on/off ouptput that I routed on IOs on the Duet. It works great for the applications but it's clearly not scalable to others sensors.

      I want to be able to "pull" sensors data from the ESP32 and be able to work with that value inside conditional gcode. I thought about using the SPI bus to communicate but I don't know if it's possible with RRF3.

      What is your suggestions on the best way to do this ? Thanks

      o_lampeundefined deckingmanundefined zaptaundefined 3 Replies Last reply Reply Quote 0
      • o_lampeundefined
        o_lampe @e4d
        last edited by

        @e4d said in How can I set up a communication between a Duet3 and an ESP32 ?:

        What is your suggestions on the best way to do this ?

        It has to be ESP32?
        A Sammy-C21 with CAN-FD would be an open platform for DIY hardware with RRF-connection

        e4dundefined 1 Reply Last reply Reply Quote 0
        • deckingmanundefined
          deckingman @e4d
          last edited by

          @e4d There is a home assistant integration so if you use ESPHome you can pull a few things off the printer and use them with an ESP32. I do this to toggle some ESP32 controlled lights depending on Z position. Failing that, MQTT might be an option but I'm not sure how far RRF has progressed with that.

          Ian
          https://somei3deas.wordpress.com/
          https://www.youtube.com/@deckingman

          1 Reply Last reply Reply Quote 0
          • e4dundefined
            e4d @o_lampe
            last edited by

            @o_lampe I'm not limited by the ESP32. I was hoping for something a bit easier than learning and modifying the firmware, that's why I went for this solution. I spent a couple of hours exploring RRF and my understanding is that I would need to modify the 6HC and 3HC firmware to be able to achieve my goal. It seems like quite a lot of work and not easy to do.

            I also thought about another solution. Would it be possible to write a Python DSF plugins that create new items in the Object Model and put some values in it. Would it be easier to do so ? What are the big steps so I can document myself and think about the best way to do it ?

            1 Reply Last reply Reply Quote 0
            • zaptaundefined
              zapta @e4d
              last edited by

              I think that you can send gcode commands from the ESP32 to the Duet to execute. Via HTTP or serial connection. I guess that this allows you to send gcode such as setting global variables that your conditional code can access. Others may know more details.

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