Good day ! I think there are 2 ways to solve your problem. : 1 - write a completely new device using the betouch.h+ code as an example bltouch.cpp (https://github.com/MarlinFirmware/Marlin/tree/bugfix-2.1.x/Marlin/src/feature ). Surely this is a more laborious way in terms of understanding the logic of the work and the coding process itself ! 2 - based on the ready-made bltouch interface, makeby z34x66 - Firmware - Marlin
My surface, on which the extrusion will be performed, is not smooth. I need to analyze the surface as the nozzle moves (X,Y) during the extrusion of the material (at each displacement of the length by a given amount or direction change), in front of the nozzle in the direction of its displacement vector. Depending on this, the value of I can be dynamically changed. After analyzing the documentby z34x66 - Firmware - Marlin