Sunday, October 06, 2019

Alert at the end of print: custom commands on ESP3D

As some may know, I have been working on a 3D printer control board based on the ESP32 microcontroller. It basically allows control of the 3D printer via any web browser. The underlying firmware is a custom fork of Marlin, while the web interface is the ESP3D webUI.

Recently, the webUI has been expanded to allow the handling of custom commands sent from the firmware using M118 gcodes. For example,
M118 [esp3d]eop
will print the message
[esp3d]eop
on the serial interface, telling the webUI the print has been completed ("eop" for "end of print"), triggering the webUI to play a short beep. This is a useful command that can be added to your end gcode.

Another custom command is
M118 [esp3d]beep(1000,300)
while will tell the webUI to play a sound of 300Hz for 1s (1000ms).

Right now, these are the only two custom commands that have been included in the webUI. But users are free to modify the custom.js file to add in addition commands that they want the webUI to handle. You can see how the above two commands were implemented in the file, and modify it to suit your needs. BTW, the webUI works on other hardware that runs the ESP3D firmware too.

No comments: