Raspberry sending gcode via WiFi to Duet
-
Dear duet community, I did a quick prototype which is supposed to speed up the calibration of my 2 independent nozzles (the lockdown is probably having bad effects on me :). I use a pi camera on the bed, looking up, and image recognition on raspberry to detect the position of the first nozzle vs the second one. So far I developed a web server on raspberry which is guiding me in a simple 2 min process in 4 steps. It is very accurate as I measure 0.05mm and more. I was thinking that would be even easier by automating all the process by sending gcode directly from raspberry to duet wifi, simulating how the DWC is doing when you put manual gcode. How can I do this?
Next step would be to add a load cell to compare z offset...
-
I'm guessing that "via Wifi" implies that you're using a Duet2 Wifi. If so...
You can send commands via the Duet's web interface, or even better might be to enable telnet on the duet and send commands via telnet. (If you're using a duet3 and SBC, there are different ways of doing this...)
For telnet, you'd add "M586 P2 S1" to your duet's config.g to enable telnet. Then your Pi could open port 23/tcp on the Pi and send commands (and get responses.)