New M-code to send a network request
-
@nightreaver said in New M-code to send a network request:
@bearer that is limited to ESP8266? and what about that ESP32? looks like a bigger package...
AFAIK ESP32 has hardware I2C support.
There may be some WIP for 100khz I2C for ESP8266, but haven't seen the code as a PR for the ESP repo
-
This is a very interesting topic. It would open a lot of possibilities for production printing. For now, I got to learn and find workarounds until Duet 3.
Thanks a lot !
-
ESP32 documentation of ESP-IDF says: "There are two I2C controllers on board of the ESP32, each of which can be set to master mode or slave mode.", so if ESP8266 is restricted, I would recommend ESP32.
The documentation is here: https://docs.espressif.com/projects/esp-idf/en/latest/api-reference/peripherals/i2c.html -
This module could be a good candidate:
-
I will build an absolute optical encoder to get the actuator positions of the scara printer, so I use ESP-CAM to have the camera.
-
I think one issue is, that these device supporting that mode on hardware side, tho the implemenation is missing.
Last time i checked there was no slave implementation on Arduino side, tho micropython seem to have it.
I just didnt start setting up micropython yet.... -
@nightreaver I can give you my code when it's finished. But it will be C for ESP-IDF, not Arduino .ino.
-
Is there any new information on this topic? I am just getting my new printer fired up and was hoping to be able to send a message to node-red running on a Pi. Node-red manages most protocolls mentioned in this thread including MQTT, HTTP UDP and TCP, so for me it does not really matter which protocol that is used. It would be great to be able to for example shut down the machine when it's done using a smart plug och get a message when it runs out of filament etc.
-
@tomwor2
It works the opposite way...
If you are familiar with Note Red you can pull the status information from the Duet, run some code in Node Red and send any command back to the Duet via g-code....
https://forum.duet3d.com/topic/18520/node-red-mobile-sized-status-dashboard-for-duetBut for an easy shut down after print is finised, that it's not required.
You can use the PS_ON pin to switch the printer of.
Or a more current solution....
https://forum.duet3d.com/topic/19161/smart-remote-power-control -
@DIY-O-Sphere said in New M-code to send a network request:
that it's not required.
You can use the PS_ON pin to switch the printer of.
Or a more current solution....Thanks for the input. I was hoping to avoid having to turn on a node-red flow when I am printing and not have to buy more hardware but your input made me think around it a couple of more turns and I think I have come up with a workable solution.
I do not have a separate PSU for 5v as I plan to run the board only when the printer is turned on but I do have a smart home controller.
I'll simply activate the node-red flow every time the smart plug for the printer is turned on and turn it off after having ensured the printer is turned off. The smart plug was anyhow needed to shut the printer down when ready and I can also measure the power I consume for printing