Using M118 for HTTP communication
Wombat37 last edited by
I'm not sure if I'm posting into the right category or even to the right site but here goes...
I've put together an ESP-32 CAM system to monitor active printing on a RepRap system.
The camera runs a server and if an external client accesses a particular URL, a screen capture is made and the image is stored for later creation of a time-lapse video.
I want to take a shot at each layer change and so I need the printer to trigger this at the correct moment. This is easy to achieve in Cura by planting specific g-code at the end of each layer but what g-code would communicate with the camera?
My thought would be to use the M118 messaging command along the lines of:
M118 P3 S"GET http://192.168.1.129/Capture HTTP/ 1.1"
The P3 option purports to send a message to HTTP but I don't really understand what this means and how to format such a message that the camera server could receive and act upon.
I don't want to connect wires between the printer and camera for triggering if I can help it.
Thanks for any suggestions.